/* ------------------- MÓDULO DE CONTROLE DE OFÍCIOS ------------------- */
.oficio-actions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.oficio-create-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.oficio-create-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.card-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-info p {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn-emitir {
    margin-top: 1.25rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-emitir:hover {
    background: var(--primary-light);
}

.oficios-history-section {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.history-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.input-search {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 280px;
    font-size: 0.875rem;
}

.input-search:focus {
    outline: none;
    border-color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.data-table th {
    background: #f8fafc;
    padding: 0.75rem 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8fafc;
}

.data-table th.col-acoes,
.data-table td.col-acoes {
    width: 1%;
    white-space: nowrap !important;
    text-align: center;
}

.code-badge {
    font-family: monospace;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    background: #fef2f2;
    color: var(--primary);
    border-radius: 4px;
    border: 1px solid #fee2e2;
}

.acoes-oficio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
    transition: all 0.15s;
}

.btn-pdf:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.btn-editar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap !important;
    flex-shrink: 0;
    line-height: 1.2;
    transition: all 0.15s;
}

.btn-editar:hover {
    background: #ffe4e6;
    transform: translateY(-1px);
}

.somente-leitura-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap !important;
}
