/* Anexos GRC — layout unificado (Certificações) */
.grc-form-tabs { border-bottom: 1px solid #e2e8f0; gap: 0.25rem; }
.grc-form-tabs .nav-link {
    font-size: 0.82rem; font-weight: 600; color: #64748b;
    border: none; border-bottom: 2px solid transparent; border-radius: 0;
    padding: 0.55rem 1rem; background: transparent;
}
.grc-form-tabs .nav-link:hover { color: #2563eb; }
.grc-form-tabs .nav-link.active { color: #1F204E; border-bottom-color: #1F204E; background: transparent; }
.grc-form-tab-content { padding-top: 0.25rem; }

.grc-anexos-card,
.grc-arquivos-panel.grc-anexos-card {
    border: 1px solid #e2e8f0; border-radius: 0.65rem;
    background: #fafbfc; padding: 1rem 1.1rem;
}
.tab-pane > .grc-anexos-card,
.tab-pane > .grc-arquivos-panel { margin-top: 0.25rem; }

.grc-arquivos-upload-head { margin-bottom: 0.75rem !important; }
.grc-arquivos-upload-title { font-weight: 700; font-size: 0.9rem; color: #0f172a; }
.grc-arquivos-upload-sub { font-size: 0.75rem; line-height: 1.45; color: #64748b !important; }
.grc-arquivos-picker-btn { font-size: 0.72rem !important; letter-spacing: 0.02em; white-space: nowrap; }

.grc-upload-zone {
    border: 2px dashed #93c5fd; border-radius: 0.65rem; background: #eff6ff;
    text-align: center; padding: 1.75rem 1rem; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.grc-upload-zone:hover, .grc-upload-zone.is-dragover { background: #dbeafe; border-color: #3b82f6; }
.grc-upload-zone.is-uploading { opacity: 0.65; pointer-events: none; }
.grc-upload-zone i.bx-cloud-upload { font-size: 2rem; color: #1d4ed8; display: block; margin-bottom: 0.45rem; }
.grc-upload-zone-title { color: #2563eb; font-weight: 600; font-size: 0.82rem; }
.grc-upload-zone-hint { color: #64748b; font-size: 0.72rem; margin-top: 0.25rem; }

.grc-anexos-link-row .form-label { color: #475569; font-weight: 500; }
.grc-anexos-link-row .btn { font-size: 0.78rem; }

.grc-arquivos-list { margin-top: 0.5rem; }
.grc-arquivos-list-head {
    font-weight: 600; color: #475569 !important; font-size: 0.78rem !important;
    padding-bottom: 0.35rem; border-bottom: 1px solid #e2e8f0;
}
.grc-arquivos-items { max-height: 300px; overflow-y: auto; margin-top: 0.5rem; }

.grc-arquivos-item {
    display: flex; align-items: center; gap: 0.65rem;
    border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.6rem 0.75rem; margin-bottom: 0.45rem;
    background: #fff; transition: border-color 0.12s, box-shadow 0.12s;
}
.grc-arquivos-item:hover { border-color: #bfdbfe; box-shadow: 0 1px 3px rgba(37,99,235,0.06); }
.grc-arquivos-item-icon { color: #94a3b8; font-size: 1.2rem; flex-shrink: 0; }
.grc-arquivos-item-body { flex: 1; min-width: 0; }
.grc-arquivos-item-title { font-weight: 600; font-size: 0.82rem; color: #1e293b; line-height: 1.35; }
.grc-arquivos-item-meta { font-size: 0.72rem; color: #64748b; margin-top: 0.12rem; }
.grc-arquivos-item .grc-arquivo-item-acoes { flex-shrink: 0; margin-left: 0.35rem; }
.grc-arquivos-item-remove {
    border: 0; background: none; color: #94a3b8; font-size: 1.1rem; line-height: 1;
    flex-shrink: 0; padding: 0.15rem; cursor: pointer; border-radius: 0.25rem;
}
.grc-arquivos-item-remove:hover { color: #dc2626; background: #fef2f2; }

.grc-arquivo-item-acoes { display: inline-flex; align-items: center; gap: 0.35rem; }
.grc-arquivo-acao {
    color: #2563eb; font-size: 1.1rem; line-height: 1; text-decoration: none;
    display: inline-flex; align-items: center; padding: 0.15rem; border-radius: 0.25rem;
}
.grc-arquivo-acao:hover { background: #eff6ff; }
.grc-arquivo-acao--download { color: #64748b; }
.grc-arquivo-acao--download:hover { color: #2563eb; }
.grc-arquivo-acao--off { color: #cbd5e1; opacity: 0.7; cursor: not-allowed; }

.grc-arquivo-olho, .grc-arquivo-anexo {
    color: #64748b; font-size: 1.15rem; line-height: 1; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; padding: 0.2rem; border-radius: 0.35rem;
}
.grc-arquivo-olho--on, .grc-arquivo-anexo--on { color: #2563eb; cursor: pointer; }
.grc-arquivo-olho--on:hover, .grc-arquivo-anexo--on:hover { color: #1d4ed8; background: #eff6ff; }
.grc-arquivo-olho--off, .grc-arquivo-anexo--off { opacity: 0.35; cursor: default; }

.grc-dpr-upload-queue {
    border: 1px solid #e2e8f0; border-radius: 0.45rem; background: #fff;
    padding: 0.35rem 0.65rem; max-height: 150px; overflow-y: auto;
}
.grc-dpr-upload-row {
    display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem;
    padding: 0.3rem 0; border-bottom: 1px solid #f1f5f9;
}
.grc-dpr-upload-row:last-child { border-bottom: 0; }
.grc-dpr-upload-row.is-busy { color: #2563eb; }
.grc-dpr-upload-row.is-ok { color: #16a34a; }
.grc-dpr-upload-row.is-err { color: #dc2626; }
.grc-dpr-upload-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grc-dpr-upload-row-msg { color: #64748b; font-size: 0.68rem; flex-shrink: 0; max-width: 45%; text-align: right; }

.grc-arquivos-modal-dialog { width: calc(100% - 1rem); max-width: none; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) {
    .grc-arquivos-modal-dialog.col-md-4 { flex: 0 0 auto; width: 33.33333333%; max-width: 33.33333333%; }
}
.grc-arquivos-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}
.grc-arquivos-modal .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.15rem 1.35rem 0.75rem;
}
.grc-arquivos-modal .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.grc-arquivos-modal .modal-title i { color: #2563eb; margin-right: 0.25rem; }
.grc-arquivos-modal .modal-subtitle { font-size: 0.78rem; color: #64748b; margin-top: 0.3rem; }
.grc-arquivos-modal .modal-body { padding: 1rem 1.35rem; }
.grc-arquivos-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem 1.2rem;
    border-top: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.grc-anexos-btn-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 7.5rem;
    padding: 0.5rem 1.25rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 2rem;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.grc-anexos-btn-fechar i { font-size: 1.05rem; line-height: 1; }
.grc-anexos-btn-fechar:hover,
.grc-anexos-btn-fechar:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1F204E;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.grc-anexos-btn-fechar:active {
    transform: translateY(0);
    box-shadow: none;
}
.grc-arquivos-modal-list { display: flex; flex-direction: column; gap: 0.45rem; }
.grc-arquivos-modal-item {
    display: flex; align-items: center; gap: 0.65rem;
    border: 1px solid #e2e8f0; border-radius: 0.45rem; padding: 0.55rem 0.65rem; background: #fff;
}
.grc-arquivos-modal-item-body { flex: 1; min-width: 0; }
.grc-arquivos-modal-item-title { font-weight: 600; font-size: 0.8rem; color: #1e293b; word-break: break-word; }
.grc-arquivos-modal-item-meta { font-size: 0.72rem; color: #64748b; margin-top: 0.1rem; }

.spl-card-actions .grc-arquivos-anexo-btn,
.spl-card-actions .grc-arquivos-olho-btn { margin-right: 0.15rem; }
table .grc-arquivo-anexo--on,
table .grc-arquivos-anexo-btn,
table .grc-table-anexo-btn {
    vertical-align: middle;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e8eef5;
    border-radius: 0.45rem;
    background: #f4f7fb;
    color: #2563eb;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
table .grc-table-anexo-btn:hover,
table .grc-table-anexo-btn:focus {
    background: #e8eef8;
    border-color: #c7d7ef;
    color: #1d4ed8;
    transform: translateY(-1px);
}
table .grc-table-anexo-btn i { pointer-events: none; }

.grc-doc-picker {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    min-height: 360px;
}
@media (max-width: 768px) {
    .grc-doc-picker { grid-template-columns: 1fr; }
}
.grc-doc-picker-sidebar {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #fafbfc;
}
.grc-doc-picker-sidebar-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
}
.grc-doc-picker-search {
    position: relative;
    margin-bottom: 0.65rem;
}
.grc-doc-picker-search i.bx-search {
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}
.grc-doc-picker-search input {
    padding-left: 2rem;
    font-size: 0.78rem;
}
.grc-doc-picker-main-head .grc-doc-picker-search {
    margin-bottom: 0;
    min-width: 220px;
    flex: 0 1 260px;
}
.grc-doc-picker-tree {
    max-height: 320px;
    overflow-y: auto;
}
.grc-doc-picker-pasta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem;
    border-radius: 0.35rem;
    cursor: pointer;
    font-size: 0.78rem;
    color: #334155;
}
.grc-doc-picker-pasta:hover,
.grc-doc-picker-pasta.is-active {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}
.grc-doc-picker-pasta i { color: #64748b; }
.grc-doc-picker-pasta.is-active i { color: #2563eb; }
.grc-doc-picker-main { min-width: 0; }
.grc-doc-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 380px;
    overflow-y: auto;
}
.grc-doc-picker-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    padding: 0.6rem 0.75rem;
    margin: 0;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.12s, background 0.12s;
}
.grc-doc-picker-item:hover {
    border-color: #bfdbfe;
    background: #f8fafc;
}
.grc-doc-picker-item .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.grc-doc-picker-item-icon {
    font-size: 1.35rem;
    color: #64748b;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.05rem;
}
.grc-doc-picker-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.grc-doc-picker-item-title {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}
.grc-doc-picker-item-meta {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
    line-height: 1.35;
}
.grc-doc-picker-item-anexo {
    margin-left: auto;
    flex-shrink: 0;
    min-width: 1.5rem;
    text-align: center;
    align-self: center;
}

.grc-doc-picker-modal.spl-ol-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}
.grc-doc-picker-modal.spl-ol-modal .modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.15rem 1.35rem 0.75rem;
}
.grc-doc-picker-modal.spl-ol-modal .modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.grc-doc-picker-modal.spl-ol-modal .modal-body {
    padding: 1rem 1.35rem;
}
.grc-anexos-modal-footer,
.grc-doc-picker-modal.spl-ol-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.85rem 1.35rem 1.2rem !important;
    border-top: 1px solid #f1f5f9 !important;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.grc-anexos-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 7.5rem;
    padding: 0.5rem 1.25rem;
    border: 1.5px solid #1F204E;
    border-radius: 2rem;
    background: #1F204E;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.grc-anexos-btn-primary:hover:not(:disabled),
.grc-anexos-btn-primary:focus:not(:disabled) {
    background: #16173a;
    border-color: #16173a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(31, 32, 78, 0.22);
    transform: translateY(-1px);
}
.grc-anexos-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.grc-anexos-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}
