/* ============================================
   LICITAÇÃO VIEW - Estilo de Visualização
   ============================================ */

/* ============================================
   Page Container
   ============================================ */
.page-container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   Page Header Profissional (Padrão Administração)
   ============================================ */
.page-header-pro {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
}

.page-header-pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            #1e3a5f 0%,
            #3b82f6 40%,
            #60a5fa 60%,
            #2d5a87 100%);
    z-index: 2;
}

/* Decorações */
.header-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.decoration-circle-1 {
    position: absolute;
    width: 300px;
    height: 300px;
    top: -140px;
    right: -40px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.decoration-circle-2 {
    position: absolute;
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: 5%;
    background: radial-gradient(circle, rgba(30, 58, 95, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

/* Top Row - Breadcrumb + Data */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px 0 32px;
    position: relative;
    z-index: 1;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.header-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-breadcrumb a:hover {
    color: #3b82f6;
}

.header-breadcrumb a ion-icon {
    font-size: 14px;
}

.breadcrumb-sep {
    font-size: 10px;
    color: #cbd5e1;
}

.header-breadcrumb > span {
    color: #64748b;
    font-weight: 500;
}

.header-date {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Main Row - Ícone + Título */
.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 32px 24px 32px;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-icon-box {
    position: relative;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #2563eb;
    flex-shrink: 0;
}

.icon-box-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 16px;
    border: 2px solid rgba(59, 130, 246, 0.15);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.header-title-group h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.header-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
    margin: 6px 0 0 0;
}

.header-subtitle ion-icon {
    font-size: 16px;
    color: #94a3b8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-header-action ion-icon {
    font-size: 16px;
}

/* ============================================
   Page Header (LEGADO)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.page-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.page-header-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.page-header-status {
    flex-shrink: 0;
}

/* ============================================
   Status Badge
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.andamento {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.status-badge.encerrado {
    background: rgba(34, 197, 94, 0.2);
    color: #16A34A;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.suspenso {
    background: rgba(234, 179, 8, 0.2);
    color: #92400E;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-badge.rascunho {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Versão para dentro de cards */
.section-content .status-badge {
    padding: 6px 12px;
    font-size: 11px;
}

.section-content .status-badge.andamento {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.section-content .status-badge.encerrado {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.section-content .status-badge.suspenso {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.section-content .status-badge.rascunho {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* ============================================
   Notification Card - Receber Atualizações
   ============================================ */
.notification-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.notification-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon ion-icon {
    font-size: 24px;
    color: white;
}

.notification-info {
    flex: 1;
    min-width: 200px;
}

.notification-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 4px 0;
}

.notification-info p {
    font-size: 14px;
    color: #3b82f6;
    margin: 0;
}

.notification-action {
    flex-shrink: 0;
}

.btn-notification {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-notification ion-icon {
    font-size: 18px;
}

.btn-subscribe {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-unsubscribe {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-unsubscribe:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

/* ============================================
   Section Card
   ============================================ */
.section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header ion-icon {
    font-size: 20px;
    color: #93c5fd;
}

.section-header h2 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.section-content {
    padding: 24px;
}

/* ============================================
   Info Grid
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-grid:last-child {
    margin-bottom: 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.info-value {
    font-size: 15px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.5;
}

.info-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

.info-object {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.info-obs {
    background: #fffbeb;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #fef3c7;
    color: #92400e;
}

.info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    text-decoration: none;
    word-break: break-all;
}

.info-link:hover {
    text-decoration: underline;
}

/* ============================================
   Files Section
   ============================================ */
.files-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.files-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.files-section-title ion-icon {
    font-size: 18px;
    color: #3b82f6;
}

.files-view-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.files-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.files-view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Files Grid (Cards)
   ============================================ */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.files-grid.hidden,
.files-list.hidden {
    display: none;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.file-card:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.file-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.file-card-icon.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.file-card-icon.doc {
    background: #dbeafe;
    color: #2563eb;
}

.file-card-icon.xls {
    background: #dcfce7;
    color: #16a34a;
}

.file-card-icon.zip {
    background: #fef3c7;
    color: #d97706;
}

.file-card-icon.img {
    background: #f3e8ff;
    color: #9333ea;
}

.file-card-icon.default {
    background: #f1f5f9;
    color: #64748b;
}

.file-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
    line-height: 1.3;
}

.file-card-date {
    font-size: 12px;
    color: #64748b;
}

/* ============================================
   Files Table (Lista)
   ============================================ */
.files-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

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

.files-table thead {
    background: #f8fafc;
}

.files-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.files-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
}

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

.files-table a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.files-table a:hover {
    text-decoration: underline;
}

.files-table .file-date {
    color: #64748b;
    white-space: nowrap;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state ion-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* ============================================
   Page Actions (Buttons)
   ============================================ */
.page-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn ion-icon {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-outline {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .page-container {
        padding: 16px;
    }

    .header-date {
        display: none;
    }

    .page-header {
        padding: 24px;
        border-radius: 12px;
    }

    .page-header-content {
        flex-direction: column;
        text-align: center;
    }

    .page-header-info {
        flex-direction: column;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .section-header {
        padding: 14px 20px;
    }

    .section-content {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .notification-content {
        flex-direction: column;
        text-align: center;
    }

    .notification-info {
        text-align: center;
    }

    .btn-notification {
        width: 100%;
        justify-content: center;
    }

    .page-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 12px;
    }

    .page-header {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 16px;
    }

    .section-header h2 {
        font-size: 14px;
    }

    .section-content {
        padding: 16px;
    }

    .info-value {
        font-size: 14px;
    }
}

/* ============================================
   CSS para Anexos Unificados - licitacaoForm.php
   Adicione ao arquivo licitacaoForm.css
   ============================================ */

/* ============================================
   Seção de Anexos - Remove espaçamento
   ============================================ */
.section-content.anexos-section {
    padding: 0;
}

.section-content.anexos-section .dropzone-wrapper {
    padding: 24px;
    padding-bottom: 16px;
}

#filelist {
    padding: 0;
}

#filelist .files-section-header {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

#filelist .files-table-wrapper {
    border: none;
    border-radius: 0;
    margin: 0;
}

#filelist .files-table {
    border-radius: 0;
}

#filelist .files-grid {
    padding: 20px 24px;
}

#filelist .files-list {
    margin: 0;
}

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

#filelist .empty-state {
    padding: 48px 24px;
}

/* ============================================
   Estilização de Arquivos Externos (na lista unificada)
   ============================================ */

/* Card de arquivo externo no GRID */
.file-card-edit.external-file {
    border-style: dashed;
    border-color: #93c5fd;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.file-card-edit.external-file:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

/* Ícone externo */
.file-card-icon.external {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

/* Badge "Link externo" no card */
.file-card-date.external-badge {
    color: #3b82f6;
    font-style: italic;
    font-size: 11px;
    font-weight: 500;
}


/* Badge inline "Externo" na tabela */
.external-badge-inline {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 8px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Drag Handle
   ============================================ */
.drag-handle {
    cursor: grab;
    padding: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: #64748b;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle ion-icon {
    font-size: 18px;
}

/* Drag handle na tabela */
.drag-handle-cell {
    width: 40px;
    text-align: center;
    padding: 8px 4px !important;
}

/* ============================================
   Estados do Sortable (Drag & Drop)
   ============================================ */
.sortable-ghost {
    opacity: 0.4;
    background: #e0f2fe !important;
}

.sortable-chosen {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.sortable-drag {
    background: #ffffff !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Ghost state para linhas da tabela */
tr.sortable-ghost {
    background: #e0f2fe !important;
}

tr.sortable-chosen {
    background: #f0f9ff !important;
}

/* ============================================
   Botões de Ação
   ============================================ */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.action-btn ion-icon {
    font-size: 16px;
}

/* Botão Editar */
.action-btn.edit-button {
    background: #eff6ff;
    color: #3b82f6;
}

.action-btn.edit-button:hover {
    background: #dbeafe;
    color: #2563eb;
}

/* Botão Salvar (oculto por padrão) */
.action-btn.save-button {
    display: none;
    background: #dcfce7;
    color: #16a34a;
}

.action-btn.save-button.editing {
    display: inline-flex;
}

.action-btn.save-button:hover {
    background: #bbf7d0;
    color: #15803d;
}

/* Botão Excluir */
.action-btn.delete-button {
    background: #fef2f2;
    color: #ef4444;
}

.action-btn.delete-button:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Ações na tabela */
.file-actions {
    text-align: center;
    white-space: nowrap;
}

.file-actions .action-btn {
    margin: 0 2px;
}

/* ============================================
   Input de edição de nome
   ============================================ */
.edited-name {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.edited-name:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   File Card Edit (Grid View)
   ============================================ */
.file-card-edit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.file-card-edit:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.file-card-edit .file-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.file-card-edit .file-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.file-card-edit .file-card-icon ion-icon {
    font-size: 20px;
}

.file-card-edit .file-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-card-edit .file-card-name {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-edit .file-card-name a {
    color: inherit;
    text-decoration: none;
}

.file-card-edit .file-card-name a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.file-card-edit .file-card-date {
    font-size: 11px;
    color: #94a3b8;
}

.file-card-edit .file-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Cores dos ícones por tipo */
.file-card-icon.pdf {
    background: #fef2f2;
    color: #ef4444;
}

.file-card-icon.word {
    background: #eff6ff;
    color: #3b82f6;
}

.file-card-icon.excel {
    background: #f0fdf4;
    color: #22c55e;
}

.file-card-icon.zip {
    background: #fefce8;
    color: #eab308;
}

.file-card-icon.image {
    background: #fdf4ff;
    color: #a855f7;
}

.file-card-icon.default {
    background: #f8fafc;
    color: #64748b;
}

/* ============================================
   Files Grid (modo edição)
   ============================================ */
#filesGridEdit {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .file-card-edit {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .file-card-edit .file-card-link {
        flex: 1 1 100%;
        order: 1;
    }
    
    .file-card-edit .drag-handle {
        order: 0;
    }
    
    .file-card-edit .file-card-actions {
        order: 2;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #f1f5f9;
    }
}

/* Remove padding do section-content */
.section-content.files-section {
    padding: 0;
}

/* Header dos arquivos */
.section-content.files-section .files-section-header {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.section-content.files-section {
    padding: 0;
}

/* Header dos arquivos */
.section-content.files-section .files-section-header {
    padding: 16px 24px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.files-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
}

.files-section-title ion-icon {
    font-size: 18px;
    color: #64748b;
}

/* Tabela sem bordas/radius */
.section-content.files-section .files-table-wrapper {
    border: none;
    border-radius: 0;
    margin: 0;
}

.section-content.files-section .files-table {
    width: 100%;
    border-collapse: collapse;
}

.section-content.files-section .files-table th {
    background: #f8fafc;
    padding: 12px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.section-content.files-section .files-table td {
    padding: 12px 24px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.section-content.files-section .files-table tbody tr:hover {
    background: #f8fafc;
}

/* Links na tabela */
.files-table td a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
}

.files-table td a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.files-table td a ion-icon {
    font-size: 16px;
    color: #64748b;
}

/* Linha externa - APENAS barra azul lateral */
.external-row td:first-child {
    border-left: 3px solid #3b82f6;
}

.external-row td a ion-icon {
    color: #3b82f6;
}

/* Data */
.file-date {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

/* Empty state */
.section-content.files-section .empty-state {
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
}

.section-content.files-section .empty-state ion-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ============================================
   RESPONSIVE: Anexos - licitacaoView.php
   Converte tabela em cards no mobile
   ============================================ */

@media (max-width: 768px) {

    /* Esconde o header da tabela no mobile */
    .section-content.files-section .files-table thead {
        display: none;
    }

    /* Remove overflow-x para eliminar scroll horizontal */
    .section-content.files-section .files-table-wrapper {
        overflow-x: visible;
    }

    /* Cada linha vira um bloco empilhado */
    .section-content.files-section .files-table,
    .section-content.files-section .files-table tbody {
        display: block;
        width: 100%;
    }

    .section-content.files-section .files-table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 14px 20px;
        border-bottom: 1px solid #f1f5f9;
        gap: 6px;
    }

    .section-content.files-section .files-table tbody tr:last-child {
        border-bottom: none;
    }

    .section-content.files-section .files-table tbody tr:hover {
        background: #f8fafc;
    }

    /* Células viram blocos */
    .section-content.files-section .files-table td {
        display: block;
        padding: 0;
        border-bottom: none;
    }

    /* Nome do arquivo - ocupa toda a largura e quebra linha */
    .section-content.files-section .files-table td:first-child a {
        word-break: break-word;
        white-space: normal;
        font-size: 14px;
        line-height: 1.4;
    }

    /* Data - estilo secundário abaixo do nome */
    .section-content.files-section .files-table td.file-date {
        font-size: 12px;
        color: #94a3b8;
        white-space: normal;
    }

    /* Barra azul lateral para links externos */
    .section-content.files-section .files-table tbody tr.external-row {
        border-left: 3px solid #3b82f6;
        padding-left: 17px;
    }

    .section-content.files-section .files-table tbody tr.external-row td:first-child {
        border-left: none;
    }

    /* Header da seção de arquivos - padding menor */
    .section-content.files-section .files-section-header {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {

    .section-content.files-section .files-table tbody tr {
        padding: 12px 16px;
    }

    .section-content.files-section .files-table td:first-child a {
        font-size: 13px;
    }

    .section-content.files-section .files-section-header {
        padding: 12px 16px;
    }

    .section-content.files-section .files-table tbody tr.external-row {
        padding-left: 13px;
    }
}