:root {
    color-scheme: light dark;
    --color-background: #ffffff;
    --color-surface: #f5f5f5;
    --color-hover: #ebebeb;
    --color-text: #171717;
    --color-text-muted: #595959;
    --color-border: #d4d4d4;
    --color-link: #005fcc;
    --color-focus: #666666;
    font-family: system-ui, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #121212;
        --color-surface: #1e1e1e;
        --color-hover: #292929;
        --color-text: #eeeeee;
        --color-text-muted: #b3b3b3;
        --color-border: #454545;
        --color-link: #8ab4f8;
        --color-focus: #aaaaaa;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--color-background);
    color: var(--color-text);
}

a {
    color: var(--color-link);
}

button, input, select, textarea {
    font: inherit;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

/* Minimal functional layout; colors continue to follow the system theme. */
.workspace { max-width: 1100px; margin: auto; padding: 24px; line-height: 1.5; }
.workspace nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.workspace section, .workspace article { margin: 20px 0; padding: 16px; border: 1px solid var(--color-border); border-radius: 6px; }
.workspace form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0; }
.workspace label { display: flex; flex-direction: column; gap: 4px; }
.workspace input, .workspace button { max-width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); color: var(--color-text); }
.workspace button, .workspace summary { cursor: pointer; }
.workspace progress { display: block; width: 100%; margin-top: 12px; }
.workspace [role="alert"] { border: 1px solid var(--color-border); padding: 12px; }
.workspace h3, .workspace .pending { overflow-wrap: anywhere; }

.workspace .metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 12px; }
.workspace .table-scroll { overflow-x: auto; }
.workspace table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.workspace th, .workspace td { text-align: left; padding: 10px; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.workspace a[aria-current=page] { font-weight: bold; text-decoration-thickness: 3px; }
.workspace select { font: inherit; color: var(--color-text); background: var(--color-surface); padding: 8px; }

/* Navegação administrativa: lateral fixa e conteúdo independente no desktop. */
.admin-workspace {
    --admin-accent: #245bdb;
    --admin-highlight: #eaf0ff;
    --admin-sidebar: #f8faff;
    max-width: none;
    min-height: 100vh;
    margin-left: 264px;
    padding: clamp(24px, 4vw, 60px);
}
.admin-workspace > h1 { margin-top: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; }
.admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 20;
    display: flex; flex-direction: column; padding: 30px 18px 20px;
    background: var(--admin-sidebar); border-right: 1px solid var(--color-border);
    overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 34px; color: var(--color-text); text-decoration: none; font-weight: 750; letter-spacing: -.025em; font-size: 18px; }
.admin-brand small { display: block; font-size: 12px; font-weight: 450; letter-spacing: .025em; color: var(--color-text-muted); margin-top: 2px; }
.admin-monogram { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #245bdb; color: white; font-size: 16px; box-shadow: 0 5px 16px #245bdb25; }
.admin-nav-caption { display: block; padding: 0 14px; margin-bottom: 12px; color: var(--color-text-muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.workspace .admin-menu { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.admin-menu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 9px; text-decoration: none; color: var(--color-text-muted); font-size: 14px; border: 1px solid transparent; }
.admin-menu a:hover { background: var(--color-surface); color: var(--color-text); }
.workspace .admin-menu a[aria-current=page] { background: var(--admin-highlight); color: var(--admin-accent); border-color: var(--admin-highlight); font-weight: 650; }
.admin-nav-icon { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; font-size: 20px; line-height: 1; }
.admin-account { margin-top: auto; padding-top: 36px; }
.workspace .admin-account form { display: block; margin: 5px 0; }
.workspace .admin-logout { display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--color-text-muted); font-size: 14px; text-align: left; }
.workspace .admin-logout:hover { background: var(--color-surface); color: var(--color-text); }
.admin-sidebar-foot { padding: 20px 14px 0; margin: 20px 0 0; border-top: 1px solid var(--color-border); font-size: 11px; color: var(--color-text-muted); }
.admin-workspace > [role=status] { padding: 12px 16px; background: var(--admin-highlight); border-radius: 8px; }
@media (prefers-color-scheme: dark) {
    .admin-workspace { --admin-sidebar: #171b24; --admin-highlight: #243453; --admin-accent: #adc7ff; }
}
@media (max-width: 760px) {
    .admin-workspace { margin-left: 0; padding: 20px; }
    .admin-sidebar { position: static; width: auto; margin: -20px -20px 28px; padding: 20px; border-right: 0; border-bottom: 1px solid var(--color-border); }
    .admin-brand { padding: 0 0 20px; }
    .workspace .admin-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
    .admin-menu a { padding: 10px 8px; font-size: 13px; gap: 6px; }
    .admin-account { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--color-border); display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
    .admin-account .admin-nav-caption, .admin-sidebar-foot { display: none; }
    .admin-account .admin-menu { display: flex; }
    .workspace .admin-logout { font-size: 13px; padding: 10px 8px; }
}
@media (prefers-reduced-motion: no-preference) {
    .admin-menu a, .workspace .admin-logout { transition: background-color .15s ease, color .15s ease; }
}

/* Indicadores e tabelas da página de armazenamento. */
.storage-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:28px; }
.storage-eyebrow { color:var(--color-text-muted); letter-spacing:.16em; font-size:10px; font-weight:700; }
.storage-heading h1 { font-size:32px; letter-spacing:-.04em; margin:6px 0; }
.storage-heading p,.storage-muted { color:var(--color-text-muted); font-size:13px; }
.storage-settings { padding:10px 16px; border:1px solid var(--color-border); border-radius:9px; text-decoration:none; font-size:13px; }
.storage-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.storage-page .storage-metrics article { margin:0; border-radius:14px; padding:22px; background:var(--color-surface); }
.storage-metrics article > span { color:var(--color-text-muted); font-size:12px; }
.storage-metrics strong { display:block; font-size:30px; letter-spacing:-.04em; margin:14px 0 8px; overflow-wrap:anywhere; }
.storage-metrics strong small { font-size:14px; font-weight:500; color:var(--color-text-muted); }
.storage-metrics p { font-size:12px; color:var(--color-text-muted); margin:0; }
.storage-page .storage-panel { padding:24px; border-radius:14px; margin-top:24px; }
.storage-panel h2 { margin:0; font-size:18px; letter-spacing:-.02em; }
.storage-panel th { font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--color-text-muted); }
.storage-panel td { font-size:13px; padding:18px 10px; }
.storage-email { display:block; color:var(--color-text-muted); margin-top:5px; }
.storage-page progress { height:6px; min-width:100px; accent-color:var(--admin-accent); }
.storage-page .storage-empty { text-align:center; padding:38px 16px; color:var(--color-text-muted); }
.storage-badge { display:inline-block; padding:4px 9px; border-radius:20px; background:var(--admin-highlight); color:var(--admin-accent); white-space:nowrap; font-size:11px; }
.storage-cleanup > p { font-size:13px; }
.storage-page .storage-cleanup label { flex-direction:row; align-items:center; gap:8px; font-size:13px; }
.storage-page .storage-cleanup button { border-radius:8px; padding:10px 16px; margin-left:auto; }
@media(max-width:1150px) { .storage-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .storage-metrics { grid-template-columns:1fr; } .storage-page .storage-panel { padding:16px; } }

/* Informação de disco secundária, recolhida por padrão. */
.storage-technical { margin-top:24px; padding:18px 22px; border:1px solid var(--color-border); border-radius:12px; color:var(--color-text-muted); font-size:13px; }
.storage-technical summary { color:var(--color-text); font-weight:600; }
.storage-technical p:last-child { margin-bottom:0; }

/* Cota pessoal na navegação de arquivos, sem acesso a informações de outras contas. */
.download-quota { margin:28px 12px 0; padding:16px 0; border-top:1px solid var(--color-border); font-size:12px; color:var(--color-text-muted); }
.download-quota progress { height:6px; accent-color:var(--admin-accent); }
.download-quota p { margin:9px 0 2px; color:var(--color-text); }
.download-quota small { font-size:10px; }
.download-workspace > section { border-radius:12px; padding:22px; }
.download-workspace .admin-sidebar-foot { overflow-wrap:anywhere; }
@media(max-width:760px) { .download-quota { margin-top:16px; padding-bottom:0; } }

/* Painel de envio: seleção, confirmação e acompanhamento em etapas visuais. */
.download-workspace #uploads { padding:28px; border-radius:18px; background:var(--color-surface); max-width:1050px; }
.upload-heading { display:flex; align-items:center; gap:14px; }
.upload-heading h2 { margin:0; font-size:22px; letter-spacing:-.03em; }
.upload-heading p { margin:4px 0 0; font-size:13px; color:var(--color-text-muted); }
.upload-symbol { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; font-size:25px; background:var(--admin-highlight); color:var(--admin-accent); }
#uploads > p { font-size:12px; color:var(--color-text-muted); }
.workspace #upload-form { display:block; margin:24px 0 18px; }
.workspace .upload-dropzone { position:relative; display:flex; align-items:center; text-align:center; gap:12px; padding:30px 20px; border:1px dashed var(--admin-accent); border-radius:14px; background:var(--color-background); cursor:pointer; }
.upload-dropzone strong { font-size:16px; font-weight:600; }
.upload-dropzone > span:not(.upload-symbol) { font-size:12px; color:var(--color-text-muted); }
/* Oculta o seletor nativo mantendo a ativação pelo rótulo e o foco pelo teclado. */
.workspace .upload-dropzone input { position:absolute; width:1px; height:1px; max-width:none; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
.upload-dropzone:focus-within { outline:2px solid var(--color-focus); outline-offset:3px; }
.upload-selection { padding:14px 2px; font-size:12px; color:var(--color-text-muted); overflow-wrap:anywhere; }
.upload-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.upload-actions > span { color:var(--color-text-muted); font-size:12px; }
.workspace #upload-start { background:#245bdb; border-color:#245bdb; color:white; padding:12px 22px; border-radius:9px; font-weight:600; }
#uploads button:disabled,#uploads input:disabled { opacity:.55; cursor:wait; }
#uploads #upload-progress { height:10px; accent-color:var(--admin-accent); border-radius:10px; }
#uploads #upload-status { margin-top:10px; min-height:22px; overflow-wrap:anywhere; }
#uploads .pending { display:flex; align-items:center; flex-wrap:wrap; gap:14px; border:1px solid var(--color-border); border-radius:12px; padding:18px; margin-top:12px; background:var(--color-background); font-size:13px; }
#uploads .pending > span { flex:1 1 100%; font-weight:600; }
#uploads .pending label { flex:1; min-width:0; }
#uploads .pending input { width:100%; }
#uploads .upload-empty { border-top:1px solid var(--color-border); padding-top:18px; margin-top:20px; }
@media(max-width:600px) { .download-workspace #uploads { padding:18px; } .upload-actions { align-items:stretch; flex-direction:column; } .workspace .upload-dropzone { padding:24px 12px; } }

/* Cartões de pastas inspirados no explorador, com ações preservadas por item. */
.file-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:16px; align-items:start; }
.workspace .file-grid .file-tile { margin:0; padding:16px; min-width:0; border-radius:12px; background:var(--color-surface); }
.file-tile-link { display:flex; flex-direction:column; align-items:center; padding:16px 8px 8px; border-radius:8px; text-decoration:none; color:var(--color-text); text-align:center; }
.explorer-icon { width:88px; height:72px; filter:drop-shadow(0 4px 3px #0002); }
.file-tile-link h3 { font-size:14px; font-weight:600; margin:14px 0 4px; overflow-wrap:anywhere; }
.file-tile > p { text-align:center; font-size:11px; color:var(--color-text-muted); }
.file-tile details { border-top:1px solid var(--color-border); padding-top:12px; font-size:12px; }
.file-tile details[open] { margin-top:12px; }
.workspace .file-tile form { display:flex; flex-direction:column; align-items:stretch; padding-top:10px; }
.file-tile label,.file-tile input { min-width:0; width:100%; }
.file-tile input[type=checkbox] { width:auto; }
.file-tile details span { overflow-wrap:anywhere; }
.new-folder-panel h2 { margin:0 0 12px; font-size:18px; }
@media(max-width:480px) { .file-grid { grid-template-columns:1fr; } }

/* Destaque ao arrastar arquivos para a seleção. */
.workspace .upload-dropzone.is-dragging { background:var(--admin-highlight); border-style:solid; outline:2px solid var(--admin-accent); outline-offset:3px; }

/* Prévia da seleção antes de iniciar a transferência. */
.upload-selected-list { list-style:none; padding:0; margin:0 0 20px; max-height:320px; overflow-y:auto; }
.upload-selected-list li { display:flex; align-items:center; gap:12px; padding:14px; margin:8px 0; border:1px solid var(--color-border); border-radius:10px; background:var(--color-background); }
.selected-file-icon { color:var(--admin-accent); background:var(--admin-highlight); border-radius:8px; padding:8px 12px; font-size:20px; }
.upload-selected-list .selected-file-row { display:grid; grid-template-columns:64px minmax(0,1fr) 100px minmax(180px, 1fr); gap:18px; }
.selected-file-name, .selected-file-meter { min-width:0; }
.selected-file-meter { display:grid; grid-template-columns:minmax(0,1fr) 40px; align-items:center; gap:6px 10px; }
.selected-file-percent { font-size:12px; text-align:right; font-variant-numeric:tabular-nums; }
.selected-file-meter .selected-file-state { grid-column:1 / -1; max-width:none; }
.upload-selected-list .selected-file-size { margin:0; white-space:nowrap; font-variant-numeric:tabular-nums; }
.upload-selected-list strong { display:block; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.upload-selected-list small { display:block; margin-top:4px; font-size:12px; color:var(--color-text-muted); }
.selected-file-state { color:var(--color-text-muted); font-size:11px; }
@media(max-width:600px) { .upload-selected-list .selected-file-row { grid-template-columns:44px minmax(0,1fr) 78px; gap:12px; } .selected-file-row .selected-file-icon { min-width:0; padding:6px; } .selected-file-meter { grid-column:2 / -1; } }

/* Identificação visual por formato e progresso independente na fila. */
.selected-file-icon { min-width:48px; min-height:54px; display:grid; place-items:center; font-size:11px; font-weight:800; letter-spacing:.03em; border-radius:5px 12px 5px 5px; }
.file-format-pdf { background:#fee2e2; color:#991b1b; }
.file-format-document { background:#dbeafe; color:#1e40af; }
.file-format-sheet { background:#dcfce7; color:#166534; }
.file-format-slides { background:#ffedd5; color:#9a3412; }
.file-format-archive { background:#f3e8ff; color:#6b21a8; }
.file-format-image { background:#ccfbf1; color:#115e59; }
.file-format-media { background:#e0e7ff; color:#3730a3; }
#uploads .selected-file-progress { width:100%; height:7px; margin:0; accent-color:var(--admin-accent); }
.upload-selected-list li[data-phase=complete] { border-color:#438563; }
.upload-selected-list li[data-phase=error] { border-color:#bd6767; }
.selected-file-state { max-width:200px; overflow-wrap:anywhere; }

/* Controles individuais ao lado do progresso, com quebra em telas menores. */
.upload-selected-list .selected-file-row { grid-template-columns:64px minmax(0,1fr) 85px minmax(140px,1fr) auto; }
.selected-file-actions { display:flex; gap:6px; }
.selected-file-actions button { padding:7px 9px; font-size:12px; }
@media(max-width:800px) { .upload-selected-list .selected-file-row { grid-template-columns:44px minmax(0,1fr) 78px; } .selected-file-meter { grid-column:2 / -1; } .selected-file-actions { grid-column:2 / -1; } }

/* Não reserva espaço para mensagens vazias na coluna de progresso. */
.selected-file-meter .selected-file-state:empty { display:none; }

.storage-summary { max-width:400px; margin:20px 0; }
.storage-summary-label { display:flex; justify-content:space-between; gap:16px; font-size:14px; }
.storage-summary progress { display:block; width:100%; height:12px; margin:8px 0; accent-color:var(--admin-accent); }
.storage-summary small { color:var(--color-text-muted); }
.folder-toolbar { margin:20px 0; }
.folder-dialog { width:min(440px,calc(100% - 32px)); padding:24px; border:1px solid var(--color-border); border-radius:16px; background:var(--color-surface); color:var(--color-text); box-shadow:0 24px 80px #0005; }
.folder-dialog::backdrop { background:#0008; }
.folder-dialog h2 { margin:0 0 20px; }
.workspace .folder-dialog form { display:flex; flex-direction:column; align-items:stretch; }
.folder-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }

/* A parte vermelha inclui as reservas, que também reduzem o espaço disponível. */
.storage-summary progress { appearance:none; border:0; border-radius:4px; overflow:hidden; height:9px; background:#31965a; color:#dc5151; }
.storage-summary progress::-webkit-progress-bar { background:#31965a; border-radius:4px; }
.storage-summary progress::-webkit-progress-value { background:#dc5151; }
.storage-summary progress::-moz-progress-bar { background:#dc5151; }
.storage-legend { display:flex; flex-wrap:wrap; gap:8px 18px; margin:8px 0; font-size:12px; }
.storage-legend span { display:inline-flex; align-items:center; gap:6px; }
.storage-legend i { display:inline-block; width:18px; height:9px; border-radius:2px; }
.storage-key-free { background:#31965a; }
.storage-key-used { background:#dc5151; }
.storage-summary small { font-size:11px; }

.workspace #move-file-form[hidden] { display:none; }
.file-tile.folder-drop-target { outline:2px solid var(--admin-accent); outline-offset:3px; }

.download-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.download-page-heading h1 { margin:0; }
.download-page-heading #new-folder-open { display:inline-flex; align-items:center; gap:8px; margin-left:auto; white-space:nowrap; }
.download-page-heading #new-folder-open svg { flex-shrink:0; }

.folder-navigation { display:flex; align-items:center; gap:10px; margin:0 0 12px; }
.workspace .folder-breadcrumbs { gap:8px; font-size:12px; color:var(--color-text-muted); min-width:0; }
.folder-breadcrumbs a { color:var(--color-text-muted); text-decoration:none; overflow-wrap:anywhere; }
.folder-breadcrumbs a:hover { text-decoration:underline; }
.folder-back { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:34px; height:34px; border:1px solid var(--color-border); border-radius:10px; color:var(--color-text); background:var(--color-surface); text-decoration:none; }
.folder-back:hover { border-color:var(--color-text-muted); }

.files-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; margin-bottom:18px; }
.files-heading h2 { margin:0; }
.files-controls { display:flex; flex-wrap:wrap; gap:12px; margin-left:auto; }
.files-controls label { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--color-text-muted); }
.files-controls select { font-size:12px; max-width:100%; }
.file-grid.is-list { grid-template-columns:1fr; gap:8px; }
.workspace .file-grid.is-list .file-tile { display:grid; grid-template-columns:minmax(0,1fr) 180px; align-items:center; column-gap:16px; padding:10px 14px; }
.is-list .file-tile-link { flex-direction:row; text-align:left; gap:14px; padding:0; }
.is-list .explorer-icon { width:40px; height:36px; flex-shrink:0; }
.is-list .file-tile-link h3 { margin:0; }
.is-list .file-tile > p { text-align:right; }
.is-list .file-tile details { grid-column:1 / -1; margin-top:8px; }
@media(max-width:600px) { .workspace .file-grid.is-list .file-tile { grid-template-columns:minmax(0,1fr); } .is-list .file-tile > p { text-align:left; } }

/* Cabeçalho do explorador com controles compactos e identificação visual. */
.files-heading { padding:4px 0 20px; margin-bottom:22px; border-bottom:1px solid var(--color-border); gap:20px; }
.files-heading-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.files-heading-title h2 { font-size:20px; letter-spacing:-.025em; }
.files-count { padding:3px 9px; border-radius:20px; font-size:11px; color:var(--color-text-muted); background:var(--color-surface); border:1px solid var(--color-border); white-space:nowrap; }
.files-controls { gap:10px; align-items:center; }
.files-controls .files-control { gap:6px; }
.files-control > span:first-child { padding-left:3px; font-size:10px; font-weight:600; letter-spacing:.03em; }
.files-select-wrap { position:relative; display:flex; align-items:center; }
.files-select-wrap svg { position:absolute; left:12px; width:17px; height:17px; color:var(--color-text-muted); pointer-events:none; }
.files-controls select { min-height:40px; border:1px solid var(--color-border); border-radius:10px; padding:9px 12px 9px 37px; background-color:var(--color-surface); color:var(--color-text); cursor:pointer; transition:border-color .15s; }
.files-controls select:hover { border-color:var(--color-text-muted); }
@media(max-width:600px) { .files-controls { width:100%; margin-left:0; } .files-controls .files-control { flex:1; min-width:130px; } .files-select-wrap select { width:100%; } }

/* Mantém os seletores sem contorno ao clicar e indica o foco por fundo e sublinhado. */
.files-controls select:focus,
.files-controls select:focus-visible,
.files-controls select:active { outline:none; box-shadow:none; border-color:var(--color-border); }
.files-controls select:focus-visible { background-color:var(--admin-highlight); text-decoration:underline; text-underline-offset:3px; }

/* Menus conectados ao seletor, sem intervalo entre o botão e as opções. */
.files-controls .files-control { display:flex; flex-direction:column; }
.files-select-wrap { min-width:170px; }
.files-select-wrap select[hidden] { display:none; }
.workspace .files-select-trigger { width:100%; min-height:40px; padding:9px 30px 9px 37px; white-space:nowrap; border:1px solid var(--color-border); border-radius:10px; background:var(--color-surface); color:var(--color-text); text-align:left; font-size:12px; cursor:pointer; }
.files-select-wrap::after { content:''; position:absolute; right:13px; top:16px; width:6px; height:6px; border-right:1.5px solid var(--color-text-muted); border-bottom:1.5px solid var(--color-text-muted); transform:rotate(45deg); pointer-events:none; }
.files-select-wrap.is-open { z-index:10; }
.workspace .is-open .files-select-trigger { border-radius:10px 10px 0 0; border-bottom-color:transparent; }
.files-options { position:absolute; top:calc(100% - 1px); left:0; right:0; background:var(--color-surface); border:1px solid var(--color-border); border-top:0; border-radius:0 0 10px 10px; padding:4px; box-shadow:0 12px 20px #0002; }
.files-options[hidden] { display:none; }
.workspace .files-options button { display:block; width:100%; border:0; border-radius:6px; background:transparent; color:var(--color-text); font-size:12px; text-align:left; padding:9px 8px; cursor:pointer; }
.workspace .files-options button:hover, .workspace .files-options button:focus-visible, .workspace .files-options button[aria-pressed=true] { background:var(--color-hover); outline:none; }
.files-select-trigger:focus { outline:none; box-shadow:none; }
.files-select-trigger:focus-visible { text-decoration:underline; text-underline-offset:3px; }

.file-tile .file-upload-date { display:none; }
.workspace .file-grid.is-list .file-tile { grid-template-columns:minmax(0,1fr) 100px 155px; }
.is-list .file-tile .file-size { white-space:nowrap; font-variant-numeric:tabular-nums; }
.is-list .file-tile .file-upload-date { display:flex; flex-direction:column; gap:3px; text-align:right; font-variant-numeric:tabular-nums; }
.file-upload-date span { font-size:10px; }
@media(max-width:600px) { .workspace .file-grid.is-list .file-tile { grid-template-columns:minmax(0,1fr) auto; } .is-list .file-tile-link { grid-column:1 / -1; } .is-list .file-tile .file-size { text-align:left; } }

.file-download-progress { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; font-size:11px; }
.file-download-progress progress { width:100%; height:8px; accent-color:var(--admin-accent); }
.workspace .file-download-progress button { padding:4px 8px; font-size:11px; margin-left:auto; }

/* Mantém nome, progresso e porcentagem juntos durante o download. */
.file-name-download-row { display:flex; align-items:center; gap:14px; min-width:0; }
.file-name-download-row > .file-tile-link { flex:1; min-width:0; }
.file-name-download-row .file-download-progress { display:grid; grid-template-columns:minmax(40px,1fr) auto auto; flex:0 1 240px; min-width:100px; margin:0; gap:6px 8px; }
.file-name-download-row .file-download-progress progress { min-width:0; margin:0; }
.file-name-download-row .file-download-progress [role=status] { font-variant-numeric:tabular-nums; }
.workspace .file-name-download-row .file-download-progress .download-cancel-icon { grid-column:auto; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:0; margin:0; border-radius:6px; }
.file-grid:not(.is-list) .file-name-download-row { gap:8px; }
.file-grid:not(.is-list) .file-name-download-row .file-download-progress { flex-basis:100px; min-width:70px; }
@media(max-width:600px) { .is-list .file-name-download-row { grid-column:1 / -1; } }

.preferences-status { font-size:11px; color:var(--color-text-muted); max-width:220px; }
.preferences-status:empty { display:none; }

.file-row-actions { display:flex; justify-content:flex-end; gap:6px; }
.workspace .file-row-actions button { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:6px; border:0; border-radius:8px; background:transparent; }
.file-row-actions svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.workspace .file-row-actions button:hover { background:var(--color-hover); }
.workspace .file-grid.is-list .file-tile { grid-template-columns:minmax(0,1fr) 85px 145px 70px; }
.workspace .item-dialog form { padding-top:0; }
.item-dialog h2 { overflow-wrap:anywhere; }
@media(max-width:600px) { .workspace .file-grid.is-list .file-tile { grid-template-columns:minmax(0,1fr) auto; } .is-list .file-row-actions { grid-column:2; } }

/* Destaca somente o nome do arquivo ou pasta sob o ponteiro, sem alterar o fundo do item. */
.file-tile-link h3:hover { text-decoration:underline; text-underline-offset:4px; text-decoration-thickness:1px; }

/* Uniformiza os cartões e mantém o nome completo disponível na dica nativa. */
.file-grid:not(.is-list) { align-items:stretch; grid-auto-rows:1fr; }
.workspace .file-grid:not(.is-list) .file-tile { min-height:230px; display:flex; flex-direction:column; }
.file-grid:not(.is-list) .file-row-actions { margin-top:auto; justify-content:center; }
.file-tile-link { min-width:0; }
.file-tile-link h3 { max-width:100%; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
.file-grid:not(.is-list) .file-tile-link h3 { width:100%; }
.is-list .file-tile-link h3 { flex:1; }

.workspace .report-filters { align-items:flex-start; gap:12px; margin:24px 0; }
.report-filters .report-filter-fields { display:flex; flex-direction:column; align-items:stretch; gap:12px; margin:0; width:280px; max-width:100%; }
.report-filter-fields .files-select-wrap { width:100%; }
.report-filter-fields .files-options { max-height:280px; overflow-y:auto; }
.report-filter-fields .files-select-trigger { white-space:normal; }
.workspace .report-filter-fields .report-failures { display:flex; flex-direction:row; align-items:center; gap:8px; font-size:12px; }
.report-failures input { margin:0; width:auto; }
.workspace .report-filters > button { margin-top:22px; min-height:40px; border-radius:10px; padding:8px 16px; }

.workspace .report-details-button { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; padding:6px; border:0; border-radius:8px; background:transparent; }
.workspace .report-details-button:hover { background:var(--color-hover); }
.report-details-dialog { width:min(580px,calc(100% - 32px)); max-height:85vh; overflow:auto; }
.report-details-dialog dl { margin:0 0 20px; }
.report-details-dialog dl > div { display:grid; grid-template-columns:160px minmax(0,1fr); gap:12px; padding:10px 0; border-bottom:1px solid var(--color-border); font-size:13px; }
.report-details-dialog dt { color:var(--color-text-muted); }
.report-details-dialog dd { margin:0; overflow-wrap:anywhere; }
@media(max-width:480px) { .report-details-dialog dl > div { grid-template-columns:1fr; gap:4px; } }

/* Limita nomes na tabela sem alterar o valor integral exibido nos detalhes. */
.report-file-name { display:block; max-width:220px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

.workspace table .report-details-cell { text-align:center; vertical-align:middle; }

.workspace table .report-empty-cell { text-align:center; }
.report-empty-cell .report-file-name { max-width:none; }
