:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, .88);
  --card-solid: #111827;
  --card-2: #0b1222;
  --text: #e5e7eb;
  --text-strong: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, .16);
  --border-2: #334155;
  --primary: #2563eb;
  --primary-2: #3b82f6;
  --ok: #16a34a;
  --err: #dc2626;
  --danger: #991b1b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .32);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, .22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 32rem),
    radial-gradient(circle at top right, rgba(14, 165, 233, .10), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #020617 55%, #050816 100%);
  color: var(--text);
}

a {
  color: #93c5fd;
}

a:hover {
  color: #bfdbfe;
}

.container,
.auth-container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.auth-container {
  max-width: 420px;
}

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  padding: 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

label {
  display: block;
  margin: .4rem 0;
}

input,
select,
button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(2, 6, 23, .62);
  color: var(--text);
  margin-bottom: 8px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
}

button,
.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 10px 13px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  font-weight: 700;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

button:hover,
.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

.danger {
  background: linear-gradient(135deg, #991b1b, #dc2626) !important;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .18) !important;
}

.alert {
  padding: 13px 15px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.alert.success {
  background: rgba(22, 163, 74, .18);
  color: #bbf7d0;
}

.alert.error {
  background: rgba(220, 38, 38, .18);
  color: #fecaca;
}

.progress {
  height: 10px;
  background: rgba(30, 41, 59, .95);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #3b82f6, #38bdf8);
  box-shadow: 0 0 18px rgba(59, 130, 246, .45);
}

.muted {
  color: var(--muted);
}

/* TOPO */

.topbar {
  min-height: 92px;
  padding: 24px 32px;
  background: rgba(15, 23, 42, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
  line-height: 1;
  color: var(--text-strong);
  letter-spacing: -.03em;
}

.topbar-subtitle {
  display: block;
  color: #cbd5e1;
  font-size: 14px;
}

.topbar nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar nav a {
  text-decoration: none;
  color: #bfdbfe;
  background: rgba(30, 41, 59, .75);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: 999px;
}

.topbar nav a:hover {
  background: rgba(37, 99, 235, .22);
}

/* LAYOUT NUVEM */

.drive-layout {
  max-width: 1460px;
  margin: 24px auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
}

.drive-main {
  min-width: 0;
}

.drive-sidebar {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  height: fit-content;
  position: sticky;
  top: 116px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  color: var(--muted);
  font-size: 11px;
  margin: 18px 10px 9px;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  padding: 12px;
  border-radius: 15px;
  margin-bottom: 5px;
  transition: background .15s ease, transform .15s ease;
}

.sidebar-item:hover {
  background: rgba(30, 41, 59, .9);
  transform: translateX(2px);
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(59, 130, 246, .12));
  border: 1px solid rgba(96, 165, 250, .25);
}

.sidebar-item span {
  width: 24px;
  display: inline-flex;
  justify-content: center;
}

.sidebar-item strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* CABEÇALHO DA ÁREA */

.drive-header-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  box-shadow: var(--shadow);
}

.drive-header-card h2 {
  font-size: 30px;
  margin: 8px 0 0;
  letter-spacing: -.03em;
  color: var(--text-strong);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  text-decoration: none;
}

.storage-mini {
  min-width: 275px;
  background: rgba(2, 6, 23, .38);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px;
}

.storage-mini span {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  margin-bottom: 8px;
}

/* BARRA DE AÇÕES */

.drive-toolbar {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 178px minmax(260px, 340px) minmax(320px, 1fr);
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-soft);
}

.toolbar-upload,
.toolbar-folder,
.toolbar-search {
  margin: 0;
}

.toolbar-folder {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.toolbar-search {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 8px;
}

.toolbar-folder input,
.toolbar-folder button,
.toolbar-search input,
.toolbar-search select,
.toolbar-search button {
  margin: 0;
  min-height: 43px;
}

.upload-button {
  width: 100%;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: 14px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
  margin: 0;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
  transition: transform .15s ease, filter .15s ease;
}

.upload-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.upload-button input,
.toolbar-upload input[type="file"] {
  display: none;
}

/* SEÇÕES */

.drive-section {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.drive-section h3 {
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--text-strong);
}

/* PASTAS */

.drive-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 13px;
}

.drive-folder-card {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(11, 18, 34, .96));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.drive-folder-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, .35);
  box-shadow: 0 16px 35px rgba(0, 0, 0, .28);
}

.folder-open-area {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.folder-big-icon {
  min-width: 46px;
  width: 46px;
  height: 46px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(59, 130, 246, .08));
  border: 1px solid rgba(96, 165, 250, .18);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
}

.folder-open-area strong,
.drive-file-info strong {
  display: block;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-open-area small,
.drive-file-info small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.folder-menu summary {
  list-style: none;
  cursor: pointer;
  background: rgba(30, 41, 59, .86);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 11px;
  user-select: none;
}

.folder-menu summary::-webkit-details-marker {
  display: none;
}

.folder-menu[open] {
  grid-column: 1 / -1;
}

.folder-menu form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 8px 0 0;
}

.folder-menu input,
.folder-menu button {
  margin: 0;
}

/* ARQUIVOS */

.drive-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.drive-file-card {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(11, 18, 34, .96));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.drive-file-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, .35);
  box-shadow: 0 16px 35px rgba(0, 0, 0, .28);
}

.drive-file-card .file-preview-area {
  width: 100% !important;
  height: 125px !important;
  padding: 0 !important;
  margin-bottom: 12px !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #111827 !important;
  border: 1px solid var(--border) !important;
  text-decoration: none !important;
}

.drive-file-card .file-preview-area img,
.drive-file-card img.drive-file-thumb,
.file-preview-area .drive-file-thumb {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.drive-file-icon {
  width: 56px;
  height: 56px;
  margin: 34px auto;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid var(--border-2);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.drive-file-info {
  min-width: 0;
  margin-bottom: 11px;
}

.drive-file-actions {
  display: grid;
  gap: 8px;
}

.drive-file-actions form {
  margin: 0;
}

.btn.small,
.drive-file-actions button,
.move-compact select {
  width: 100%;
  margin: 0;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  min-height: 37px;
}

.move-compact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.move-compact button {
  width: auto;
}

/* ESTADO VAZIO */

.empty-state {
  border: 1px dashed var(--border-2);
  border-radius: 20px;
  padding: 44px 18px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  background: rgba(2, 6, 23, .22);
}

.empty-state div {
  font-size: 42px;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

/* TABELAS ANTIGAS, CASO ALGUMA PÁGINA AINDA USE */

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.inline input,
.inline select,
.inline button {
  width: auto;
  margin: 0;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: center;
}

.preview-cell {
  width: 48px;
}

.file-thumb,
.file-thumb-generic {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-2);
  background: #111827;
  display: block;
}

.file-thumb {
  object-fit: cover;
}

.file-thumb-generic {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b, #334155);
  letter-spacing: .3px;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.actions-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.move-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.move-form select {
  width: 130px;
  margin: 0;
  padding: 8px;
}

.move-form button {
  margin: 0;
  padding: 8px 10px;
}

/* RESPONSIVO */

@media (max-width: 1100px) {
  .drive-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-folder,
  .toolbar-search {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .drive-layout {
    grid-template-columns: 1fr;
  }

  .drive-sidebar {
    position: static;
  }

  .drive-header-card {
    flex-direction: column;
    align-items: stretch;
  }

  .storage-mini {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .drive-layout {
    margin-top: 14px;
    padding: 0 10px;
  }

  .drive-folder-grid,
  .drive-file-grid {
    grid-template-columns: 1fr;
  }

  .drive-header-card h2 {
    font-size: 24px;
  }

  .topbar nav {
    flex-wrap: wrap;
  }
}

/* UPLOAD COM PROGRESSO */

.upload-progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upload-progress-card {
  width: min(520px, 100%);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(11, 18, 34, .98));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.upload-progress-header strong {
  display: block;
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 6px;
}

.upload-progress-file {
  display: block;
  max-width: 340px;
  color: #94a3b8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-percent {
  min-width: 74px;
  text-align: right;
  font-size: 28px;
  font-weight: 900;
  color: #93c5fd;
  letter-spacing: -.04em;
}

.upload-progress-bar {
  height: 14px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #3b82f6, #38bdf8);
  box-shadow: 0 0 24px rgba(59, 130, 246, .55);
  transition: width .18s ease;
}

.upload-progress-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.upload-progress-details span {
  background: rgba(2, 6, 23, .45);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 12px;
  padding: 10px;
  color: #cbd5e1;
  font-size: 12px;
  text-align: center;
}

.upload-progress-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(37, 99, 235, .14);
  border: 1px solid rgba(96, 165, 250, .22);
  color: #bfdbfe;
  font-size: 14px;
  text-align: center;
}

.upload-progress-error .upload-progress-status {
  background: rgba(220, 38, 38, .16);
  border-color: rgba(248, 113, 113, .28);
  color: #fecaca;
}

@media (max-width: 600px) {
  .upload-progress-card {
    padding: 18px;
  }

  .upload-progress-header {
    flex-direction: column;
  }

  .upload-progress-percent {
    text-align: left;
  }

  .upload-progress-details {
    grid-template-columns: 1fr;
  }

  .upload-progress-file {
    max-width: 100%;
  }
}

/* BOTÃO SECUNDÁRIO */

.btn.secondary,
button.secondary {
  background: rgba(30, 41, 59, .92) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  box-shadow: none !important;
}

.btn.secondary:hover,
button.secondary:hover {
  background: rgba(51, 65, 85, .92) !important;
}

/* UPLOAD EM SEGUNDO PLANO */

.upload-progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: auto;
}

.upload-progress-card {
  width: min(560px, 100%);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(11, 18, 34, .98));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.upload-progress-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.upload-progress-actions button {
  width: auto;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: none;
}

.upload-cancel-btn {
  background: linear-gradient(135deg, #991b1b, #dc2626) !important;
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.upload-progress-header strong {
  display: block;
  font-size: 20px;
  color: #f8fafc;
  margin-bottom: 6px;
}

.upload-progress-file {
  display: block;
  max-width: 360px;
  color: #94a3b8;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-percent {
  min-width: 74px;
  text-align: right;
  font-size: 28px;
  font-weight: 900;
  color: #93c5fd;
  letter-spacing: -.04em;
}

.upload-progress-bar {
  height: 14px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #3b82f6, #38bdf8);
  box-shadow: 0 0 24px rgba(59, 130, 246, .55);
  transition: width .18s ease;
}

.upload-progress-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.upload-progress-details span {
  background: rgba(2, 6, 23, .45);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 12px;
  padding: 10px;
  color: #cbd5e1;
  font-size: 12px;
  text-align: center;
}

.upload-progress-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(37, 99, 235, .14);
  border: 1px solid rgba(96, 165, 250, .22);
  color: #bfdbfe;
  font-size: 14px;
  text-align: center;
}

.upload-complete-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.upload-complete-actions button {
  margin: 0;
}

.upload-progress-error .upload-progress-status {
  background: rgba(220, 38, 38, .16);
  border-color: rgba(248, 113, 113, .28);
  color: #fecaca;
}

.upload-progress-success .upload-progress-status {
  background: rgba(22, 163, 74, .16);
  border-color: rgba(74, 222, 128, .28);
  color: #bbf7d0;
}

.upload-progress-overlay.minimized {
  inset: auto 18px 18px auto;
  width: 360px;
  max-width: calc(100vw - 36px);
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  align-items: unset;
  justify-content: unset;
}

.upload-progress-overlay.minimized .upload-progress-card {
  width: 100%;
  padding: 14px;
  border-radius: 18px;
}

.upload-progress-overlay.minimized .upload-progress-details,
.upload-progress-overlay.minimized .upload-complete-actions {
  display: none;
}

.upload-progress-overlay.minimized .upload-progress-header {
  margin-bottom: 10px;
}

.upload-progress-overlay.minimized .upload-progress-header strong {
  font-size: 14px;
}

.upload-progress-overlay.minimized .upload-progress-file {
  max-width: 190px;
}

.upload-progress-overlay.minimized .upload-progress-percent {
  font-size: 20px;
  min-width: 52px;
}

.upload-progress-overlay.minimized .upload-progress-status {
  font-size: 12px;
  padding: 8px;
}

/* MODAL DE PRÉ-VISUALIZAÇÃO */

.file-preview-modal[hidden] {
  display: none !important;
}

.file-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.file-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .78);
  backdrop-filter: blur(10px);
}

.file-preview-window {
  position: relative;
  width: min(1100px, 100%);
  height: min(760px, 92vh);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(11, 18, 34, .98));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-preview-header {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.file-preview-title {
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-close {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  box-shadow: none;
}

.file-preview-body {
  flex: 1;
  min-height: 0;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.file-preview-loading {
  color: #94a3b8;
  text-align: center;
}

.preview-media {
  max-width: 100%;
  max-height: 100%;
}

.preview-image {
  object-fit: contain;
  border-radius: 12px;
}

.preview-video {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 12px;
}

.preview-audio {
  width: min(720px, 100%);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  border-radius: 12px;
}

@media (max-width: 700px) {
  .upload-progress-overlay.minimized {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
  }

  .upload-progress-details {
    grid-template-columns: 1fr;
  }

  .file-preview-modal {
    padding: 10px;
  }

  .file-preview-window {
    height: 92vh;
  }
}