/* =====================================================================
   Gracel V0.0.49 — Documentos (Escritório GC) e pastas compartilhadas (Escritório + Portal do Cliente)
   Pastas viram itens compactos (ícone + nome + quantidade), sem a ilustração grande.
   ===================================================================== */

/* ---------- Pastas (escritório e portal) ---------- */
.gc-doc-explorer .gc-folder-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;gap:8px!important;margin:0!important}
.gc-doc-explorer button.gc-folder-tile{
 all:unset;box-sizing:border-box;display:grid!important;grid-template-columns:36px minmax(0,1fr) 16px;align-items:center;gap:12px;
 min-height:56px!important;height:auto!important;padding:10px 12px!important;border-radius:8px!important;background:#f5f7fa!important;
 box-shadow:none!important;border:0!important;cursor:pointer;transition:background-color .15s!important;transform:none!important
}
.gc-doc-explorer button.gc-folder-tile[hidden]{display:none!important}
.gc-doc-explorer button.gc-folder-tile:hover{background:#eaeef4!important}
.gc-doc-explorer button.gc-folder-tile:active{background:#e1e7ef!important}
.gc-doc-explorer button.gc-folder-tile:focus-visible{outline:2px solid #29477f!important;outline-offset:2px}
.gc-doc-explorer .gc-folder-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:8px;background:#fff;color:#8a99ad}
.gc-doc-explorer .gc-folder-icon.has-files{background:#fff;color:#c98500}
.gc-doc-explorer .gc-folder-icon svg{width:20px;height:20px;fill:currentColor;fill-opacity:.18;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.gc-doc-explorer .gc-folder-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.gc-doc-explorer .gc-folder-name{display:block!important;margin:0!important;font-size:13.5px!important;font-weight:700!important;line-height:1.3!important;color:#14213d!important;white-space:normal;overflow:hidden;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.gc-doc-explorer .gc-folder-sub{display:block!important;margin:0!important;font-size:12px!important;font-weight:500!important;color:#8a96a8!important}
.gc-doc-explorer .gc-folder-chev{width:16px;height:16px;fill:none;stroke:#b3bdcb;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s,stroke .15s}
.gc-doc-explorer button.gc-folder-tile:hover .gc-folder-chev{stroke:#14213d;transform:translateX(2px)}

/* Caminho, título e filtro */
.gc-doc-explorer .gc-folder-trail{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:0 0 12px!important;padding:0!important;background:transparent!important;font-size:13px}
.gc-doc-explorer .gc-folder-trail button{all:unset;cursor:pointer;padding:4px 6px;border-radius:6px;color:#29477f;font-weight:600}
.gc-doc-explorer .gc-folder-trail button:hover{background:#eef2f8}
.gc-doc-explorer .gc-folder-trail strong{padding:4px 6px;color:#14213d;font-weight:700}
.gc-doc-explorer .gc-folder-trail-sep{color:#b3bdcb}
.gc-doc-explorer .gc-folder-content-head{margin:0 0 12px!important}
.gc-doc-explorer .gc-folder-content-head :is(h4,h2){margin:0!important;font-size:16px!important;font-weight:700!important;color:#14213d!important}
.gc-doc-explorer .gc-folder-content-head p{margin:2px 0 0!important;font-size:12.5px!important;color:#6b7a90!important}
.gc-doc-explorer .gc-folder-filter-wrap{position:relative;display:block!important;max-width:360px;margin:0 0 12px!important}
.gc-doc-explorer .gc-folder-filter-wrap .gc-filter-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;font-size:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center/18px no-repeat;pointer-events:none}
.gc-doc-explorer .gc-folder-filter-wrap input{width:100%;height:40px!important;min-height:40px!important;padding:0 12px 0 40px!important;border-radius:8px!important;border:1px solid #d9e0ea!important;background:#fff!important;font-size:14px!important;box-sizing:border-box}
.gc-doc-explorer :is(.gc-folder-empty,.gc-folder-filter-empty){padding:24px 12px!important;border-radius:10px!important;border:0!important;background:#f7f9fc!important;text-align:center;font-size:13px!important;color:#6b7a90!important}

/* Arquivos: lista com divisória */
.gc-doc-explorer .gc-document-grid{display:flex!important;flex-direction:column;gap:0!important;margin-top:4px}
.gc-doc-explorer .gc-document-card{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 4px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;border-bottom:1px solid #eef2f6!important;transform:none!important}
.gc-doc-explorer .gc-document-card:last-child{border-bottom:0!important}
.gc-doc-explorer .gc-document-card:hover{background:#f8fafc!important}
.gc-doc-explorer .gc-file-mark{display:grid!important;place-items:center;width:40px!important;height:40px!important;border-radius:10px!important;background:#fdecec!important;color:#c03434!important;font-size:10.5px!important;font-weight:800!important;letter-spacing:.02em}
.gc-doc-explorer .gc-document-card-info{min-width:0}
.gc-doc-explorer .gc-document-card-info strong{display:block;font-size:13.5px!important;font-weight:700!important;color:#14213d!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gc-doc-explorer .gc-document-card-info small{display:block;font-size:12px!important;color:#8a96a8!important}
.gc-doc-explorer .gc-document-card .gc-doc-actions{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:4px!important;margin:0!important}

/* ---------- Escritório: lista de empresas ---------- */
.gc-ofx .content .gc-doc-list .gc-ct-filter .btn{flex:none}
.gc-ofx .content table.gc-doc-table{min-width:560px}
.gc-ofx .content table.gc-doc-table th:last-child{width:1%}

/* ---------- Escritório: página da empresa ---------- */
.gc-ofx .content .gc-doc-top{margin:0 0 14px}
.gc-ofx .content .gc-doc-back{height:32px!important;min-height:32px!important;padding:0 12px 0 8px!important;gap:4px!important;font-size:13px!important;background:transparent!important;box-shadow:none!important;color:#46566d!important}
.gc-ofx .content .gc-doc-back:hover{background:#e9edf3!important;color:#14213d!important}
.gc-ofx .content .gc-doc-back svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.gc-ofx .content .gc-doc-company-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 20px}
.gc-ofx .content .gc-doc-company-head h2{margin:0!important;font-size:20px!important;font-weight:700!important;color:#14213d!important;line-height:1.25}
.gc-ofx .content .gc-doc-company-head small{display:block;margin-top:2px;font-size:12.5px!important;color:#6b7a90!important}
.gc-ofx .content .gc-doc-avatar{width:44px!important;height:44px!important;border-radius:12px!important;font-size:14px!important;background:#14213d!important;color:#fff!important}
.gc-ofx .content .gc-doc-manager-shortcuts{display:flex!important;gap:8px!important;margin:0!important;padding:0!important;background:transparent!important}

.gc-ofx .content .gc-doc-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.gc-ofx .content .gc-doc-main,.gc-ofx .content .gc-doc-aside{display:flex;flex-direction:column;gap:20px;min-width:0}
.gc-ofx .content .gc-doc-aside{position:sticky;top:96px}
.gc-ofx .content .gc-doc-panel{margin:0!important;padding:22px 24px!important}
.gc-ofx .content .gc-doc-panel-head{margin:0 0 16px}
.gc-ofx .content .gc-doc-panel-head h3{margin:0!important;font-size:15px!important;font-weight:700!important;color:#14213d!important}
.gc-ofx .content .gc-doc-panel-head p{margin:3px 0 0!important;font-size:12.5px!important;line-height:1.5;color:#6b7a90!important}
.gc-ofx .content .gc-doc-history #gcDocHistoryList:not(:empty){margin-top:14px}

/* Formulários da coluna lateral: um campo por linha */
.gc-ofx .content .gc-doc-form-v49{display:flex!important;flex-direction:column;align-items:stretch!important;gap:14px!important}
.gc-ofx .content .gc-doc-form-v49 .gc-file{width:100%;box-sizing:border-box}
.gc-ofx .content .gc-doc-form-v49>label:not(.gc-doc-publish),.gc-ofx .content .gc-doc-form-v49 .gc-doc-form-row>label{display:flex!important;flex-direction:column;gap:6px!important;margin:0!important;font-size:12px!important;font-weight:600!important;color:#46566d!important;min-width:0}
.gc-ofx .content .gc-doc-form-v49 label small{font-size:11.5px;font-weight:500;color:#8a96a8}
.gc-ofx .content .gc-doc-form-v49 :is(input:not([type="checkbox"]):not([type="file"]),select){width:100%!important;min-width:0!important}
.gc-ofx .content .gc-doc-form-v49 .gc-doc-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gc-ofx .content .gc-doc-form-v49 .gc-doc-publish{display:flex!important;align-items:flex-start;gap:10px;margin:0!important;font-size:13px!important;font-weight:500!important;line-height:1.4;color:#46566d!important;cursor:pointer}
.gc-ofx .content .gc-doc-form-v49 .gc-doc-publish input{margin-top:1px!important;flex:none}
.gc-ofx .content .gc-doc-form-v49>.btn{width:100%;margin-top:2px}

@media (max-width:1180px){
 .gc-ofx .content .gc-doc-layout{grid-template-columns:1fr}
 .gc-ofx .content .gc-doc-aside{position:static;display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
}
@media (max-width:640px){
 .gc-ofx .content .gc-doc-company-head{align-items:flex-start}
 .gc-ofx .content .gc-doc-manager-shortcuts{width:100%}
 .gc-ofx .content .gc-doc-manager-shortcuts .btn{flex:1}
 .gc-ofx .content .gc-doc-panel{padding:18px 16px!important}
 .gc-doc-explorer .gc-document-card{grid-template-columns:40px minmax(0,1fr)}
 .gc-doc-explorer .gc-document-card .gc-doc-actions{grid-column:1/-1;justify-content:flex-start}
}
