/* purplebase Vault — Windows 95 meets Schleiereule 🦉 (v2.6.0 Re-Skin)
   Klassischer Win95-Look mit purplebase-violetten Titelleisten.
   Keine externen Fonts/Assets (CSP: self only). */

:root {
  /* Win95 chrome */
  --win-face: #c0c0c0;
  --win-face-light: #dfdfdf;
  --win-highlight: #ffffff;
  --win-shadow: #808080;
  --win-dark: #404040;
  --win-desktop: #008080;

  /* purplebase violet (statt Win95-Blau) */
  --violet: #a855f7;
  --violet-dark: #6b21a8;
  --violet-deep: #4c1d95;
  --title-grad: linear-gradient(90deg, #4c1d95 0%, #a855f7 100%);
  --title-text: #ffffff;

  --text: #000000;
  --text-muted: #5a5a5a;
  --red: #aa0000;
  --green: #007700;

  --bevel-out: inset -1px -1px 0 var(--win-dark),
               inset 1px 1px 0 var(--win-highlight),
               inset -2px -2px 0 var(--win-shadow),
               inset 2px 2px 0 var(--win-face-light);
  --bevel-in:  inset 1px 1px 0 var(--win-dark),
               inset -1px -1px 0 var(--win-highlight),
               inset 2px 2px 0 var(--win-shadow),
               inset -2px -2px 0 var(--win-face-light);
  --font: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--win-desktop);
  /* Klassisches Teal-Desktop mit dezentem Pixel-Dither */
  background-image:
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%),
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 2px 2px;
  -webkit-font-smoothing: none;
  padding: 16px;
}

h1, h2, h3 { font-weight: bold; }
a { color: var(--violet-deep); }

/* ── Win95 window chrome ─────────────────────────────── */
.win95-window {
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  border-radius: 0;
  padding: 3px;
  display: flex;
  flex-direction: column;
}

.titlebar {
  background: var(--title-grad);
  color: var(--title-text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  user-select: none;
  min-height: 26px;
}

.titlebar-icon { font-size: 14px; line-height: 1; }

.titlebar-text {
  flex: 1;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar-buttons { display: flex; gap: 2px; align-items: center; }

.tb-btn {
  width: 20px;
  height: 18px;
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  display: inline-block;
  border: 0;
  padding: 0;
  cursor: default;
}

button.tb-btn { cursor: pointer; }
button.tb-btn:active { box-shadow: var(--bevel-in); }

.menubar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-bottom: 1px solid var(--win-shadow);
  box-shadow: 0 1px 0 var(--win-highlight);
  user-select: none;
}

.menu-item { padding: 2px 8px; font-size: 13px; color: var(--text); }
.menu-item:hover { background: var(--violet-dark); color: #fff; }

.menu-lock {
  margin-left: auto;
  font-family: var(--font);
  font-size: 12px;
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  border: 0;
  padding: 3px 10px;
  min-height: 24px;
  cursor: pointer;
}
.menu-lock:active { box-shadow: var(--bevel-in); padding: 4px 9px 2px 11px; }

.window-body { padding: 12px; flex: 1; }

.statusbar { display: flex; gap: 3px; padding: 3px; margin-top: 2px; }

.status-cell {
  box-shadow: inset 1px 1px 0 var(--win-shadow), inset -1px -1px 0 var(--win-highlight);
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-cell.grow { flex: 1; }

/* ── Generic Win95 buttons ───────────────────────────── */
button { font-family: var(--font); font-size: 13px; border-radius: 0; }

.btn-primary, .btn-upload, .btn-cancel, .btn-danger, .btn-page {
  background: var(--win-face);
  border: 0;
  box-shadow: var(--bevel-out);
  padding: 6px 20px;
  min-height: 44px;
  color: var(--text);
  cursor: pointer;
}

.btn-primary:active, .btn-upload:active, .btn-cancel:active,
.btn-danger:active, .btn-page:active {
  box-shadow: var(--bevel-in);
  padding: 7px 19px 5px 21px;
}

.btn-primary:focus-visible, .btn-upload:focus-visible, .btn-cancel:focus-visible,
.btn-danger:focus-visible, .btn-page:focus-visible,
.menu-lock:focus-visible, .btn-icon:focus-visible, .btn-ghost:focus-visible,
.btn-ghost-sm:focus-visible {
  outline: 1px dotted var(--text);
  outline-offset: -5px;
}

.btn-primary:disabled, .btn-upload:disabled, .btn-page:disabled {
  color: var(--win-shadow);
  text-shadow: 1px 1px 0 var(--win-highlight);
  cursor: default;
  box-shadow: var(--bevel-out);
}

.btn-primary { width: 100%; font-weight: bold; }
.btn-danger { font-weight: bold; color: var(--red); }

/* Sekundäre Buttons (Passkey registrieren, Recovery, 2FA …) */
.btn-ghost, .btn-ghost-sm {
  background: var(--win-face);
  border: 0;
  box-shadow: var(--bevel-out);
  padding: 5px 12px;
  min-height: 32px;
  color: var(--text);
  cursor: pointer;
}
.btn-ghost:active, .btn-ghost-sm:active { box-shadow: var(--bevel-in); padding: 6px 11px 4px 13px; }

/* ── Inputs ──────────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
  text-align: left;
}

input[type="password"], input[type="text"], input[type="email"], select, textarea {
  font-family: var(--font);
  font-size: 16px;
  background: #ffffff;
  color: var(--text);
  border: 0;
  border-radius: 0;
  box-shadow: var(--bevel-in);
  padding: 8px;
  width: 100%;
  min-height: 44px;
}

input:focus, select:focus, textarea:focus {
  outline: 1px dotted var(--text);
  outline-offset: -4px;
}

input[type="checkbox"] { accent-color: var(--violet-dark); width: 16px; height: 16px; }

.input-group { margin-bottom: 12px; }

code {
  font-family: "Courier New", monospace;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 2px 5px;
  font-size: 12px;
  word-break: break-all;
}

/* ── Login modal ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--win-desktop);
  background-image:
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%),
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.04) 75%);
  background-size: 4px 4px;
  background-position: 0 0, 2px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  overflow-y: auto;
}

.modal { width: 100%; max-width: 400px; }
.modal .window-body { text-align: center; }

.vault-logo {
  font-size: 48px;
  line-height: 1;
  margin: 8px auto 10px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: var(--bevel-in);
}

.modal h2, .download-card h2, .dl-card h2 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--violet-deep);
}

.vault-tagline { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.vault-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.vault-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--win-face-light);
  box-shadow: inset 1px 1px 0 var(--win-highlight), inset -1px -1px 0 var(--win-shadow);
  color: var(--violet-deep);
  font-weight: bold;
}

.error-text {
  display: none;
  color: var(--red);
  font-size: 12px;
  margin-top: 10px;
  padding: 6px 8px;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  text-align: left;
}

/* ── App layout ──────────────────────────────────────── */
.container { max-width: 860px; margin: 0 auto; }
.main-window { min-height: 60vh; }

/* Sektionen (Upload / Passkeys / 2FA / Files) als Win95-Gruppenfenster */
.admin-card {
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  border-radius: 0;
  padding: 3px;
  margin-bottom: 12px;
}

.admin-card > .card-titlebar {
  background: var(--title-grad);
  color: var(--title-text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  min-height: 22px;
  font-size: 12px;
  font-weight: bold;
  user-select: none;
  margin-bottom: 8px;
}

.admin-card > .card-titlebar .tb-btn { width: 18px; height: 16px; line-height: 14px; font-size: 10px; margin-left: auto; }

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 8px;
  margin-bottom: 8px;
}

.admin-card-title { display: flex; align-items: flex-start; gap: 8px; }
.admin-card-icon { font-size: 20px; line-height: 1.2; }
.admin-card-title h2 { font-size: 14px; }
.admin-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.admin-card .card-inner { padding: 0 8px 8px; }

/* Hinweis-Boxen */
.admin-note {
  background: #ffffcc;
  box-shadow: var(--bevel-in);
  border-left: 4px solid var(--violet);
  padding: 8px 10px;
  font-size: 12px;
  margin: 8px 8px;
  line-height: 1.5;
}

.admin-note-alert {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-weight: bold;
}

.admin-warn {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  border-left: 4px solid var(--red);
  color: var(--red);
  padding: 8px 10px;
  font-size: 12px;
  margin: 8px 8px;
}

/* ── Dropzone ────────────────────────────────────────── */
.dropzone {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  border: 2px dashed var(--win-shadow);
  border-radius: 0;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  margin: 0 8px 12px;
}

.dropzone:hover { border-color: var(--violet); }
.dropzone.dragover { border-color: var(--violet); background: #f3e8ff; }
.dropzone .icon { font-size: 32px; margin-bottom: 8px; }
.dropzone h3 { font-size: 14px; margin-bottom: 4px; }
.dropzone p { font-size: 12px; color: var(--text-muted); }
.dropzone input[type="file"] { display: none; }

/* ── Upload options ──────────────────────────────────── */
.upload-options { display: none; margin: 0 8px 12px; }
.upload-options.show { display: block; }

.win95-fieldset {
  border: 1px solid var(--win-shadow);
  box-shadow: 1px 1px 0 var(--win-highlight), inset 1px 1px 0 var(--win-highlight);
  border-radius: 0;
  padding: 10px 12px 12px;
}

.win95-fieldset legend {
  font-size: 12px;
  font-weight: bold;
  padding: 0 4px;
  color: var(--violet-deep);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 6px 8px;
  flex-wrap: wrap;
}

.file-info .name { font-weight: bold; word-break: break-all; }
.file-info .size { color: var(--text-muted); font-size: 12px; }

.expiry-row { margin-bottom: 12px; }
.expiry-row select { max-width: 240px; }

.burn-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  min-height: 24px;
}
.burn-toggle input[type="checkbox"] { margin-top: 1px; flex-shrink: 0; min-height: 0; width: 16px; }
.burn-toggle small { color: var(--text-muted); }

.passphrase-row { display: flex; gap: 6px; margin-bottom: 12px; }
.passphrase-row input { flex: 1; }
.passphrase-row .btn-icon { margin-left: 0; min-height: 44px; min-width: 44px; }

.passkey-upload-note {
  background: #e8f5e9;
  box-shadow: var(--bevel-in);
  border-left: 4px solid var(--green);
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.upload-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-upload { font-weight: bold; }

/* ── Progress ────────────────────────────────────────── */
.progress-container { display: none; margin: 0 8px 12px; }
.progress-container.show { display: block; }

.progress-bar {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  height: 22px;
  padding: 3px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  width: 0%;
  /* Win95-Blocksegmente in violett */
  background: repeating-linear-gradient(
    90deg,
    var(--violet) 0px, var(--violet) 10px,
    #ffffff 10px, #ffffff 12px
  );
  transition: width 0.2s;
}

.progress-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Tabellen (Files + Passkeys) ─────────────────────── */
.count {
  font-size: 11px;
  padding: 2px 8px;
  box-shadow: inset 1px 1px 0 var(--win-shadow), inset -1px -1px 0 var(--win-highlight);
  color: var(--text-muted);
  white-space: nowrap;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 32px 16px;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  color: var(--text-muted);
  margin: 0 8px 8px;
}

.empty-state .icon { font-size: 32px; margin-bottom: 8px; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 8px 8px;
}

.file-table, .passkey-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  font-size: 12px;
}

.file-table th, .passkey-table th {
  text-align: left;
  padding: 5px 10px;
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
  user-select: none;
}

.file-table td, .passkey-table td {
  padding: 8px 10px;
  border-bottom: 1px dotted #d0d0d0;
  vertical-align: middle;
}

.file-table tr:hover td, .passkey-table tr:hover td { background: #f3e8ff; }

.file-table .filename {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enc-placeholder { color: var(--text-muted); font-style: italic; }

.file-table .meta, .passkey-table .meta { color: var(--text-muted); white-space: nowrap; }
.file-table .actions, .passkey-table .actions { text-align: right; white-space: nowrap; }
.th-actions { text-align: right; }

.pk-name { font-weight: bold; word-break: break-all; }

.pk-chip {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 6px;
  background: var(--win-face-light);
  box-shadow: inset 1px 1px 0 var(--win-highlight), inset -1px -1px 0 var(--win-shadow);
  color: var(--violet-deep);
  font-weight: bold;
  vertical-align: middle;
}

.btn-icon {
  background: var(--win-face);
  border: 0;
  box-shadow: var(--bevel-out);
  padding: 5px 8px;
  min-height: 32px;
  min-width: 32px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}

.btn-icon:active { box-shadow: var(--bevel-in); }
.btn-icon.delete:hover { color: var(--red); }
.btn-icon.copy:hover { color: var(--violet-deep); }

/* ── Paginierung ─────────────────────────────────────── */
.pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 8px 8px;
}

.btn-page { min-height: 36px; padding: 4px 14px; font-size: 12px; }
.btn-page:active { padding: 5px 13px 3px 15px; }

.page-info {
  font-size: 12px;
  padding: 4px 10px;
  box-shadow: inset 1px 1px 0 var(--win-shadow), inset -1px -1px 0 var(--win-highlight);
  color: var(--text);
  white-space: nowrap;
}

/* ── 2FA / QR ────────────────────────────────────────── */
.twofa-panel { margin: 8px; }
.twofa-code-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.twofa-code-row input { flex: 1; min-width: 140px; }
.twofa-code-row .btn-primary { width: auto; flex-shrink: 0; }

#twofaQr {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  display: inline-block;
  padding: 10px;
}
#twofaQr img, #twofaQr svg { display: block; image-rendering: pixelated; }

/* ── Win95-Dialoge (nyxModalRoot) ────────────────────── */
.nyx-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 300;
}

.nyx-dialog {
  background: var(--win-face);
  box-shadow: var(--bevel-out), 3px 3px 0 rgba(0,0,0,0.3);
  border-radius: 0;
  width: 100%;
  max-width: 420px;
  padding: 3px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Titelleiste des Dialogs = das h3 */
.nyx-dialog h3 {
  background: var(--title-grad);
  color: var(--title-text);
  font-size: 13px;
  font-weight: bold;
  padding: 4px 8px;
  margin-bottom: 10px;
  user-select: none;
}

.nyx-dialog p {
  font-size: 12px;
  line-height: 1.5;
  padding: 0 10px;
  margin-bottom: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.nyx-dialog input {
  width: calc(100% - 20px);
  margin: 0 10px 12px;
}

.nyx-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 10px 10px;
  flex-wrap: wrap;
}

.nyx-dialog-actions button { min-width: 90px; }
.nyx-dialog-actions .btn-primary { width: auto; }

/* ── Footer ──────────────────────────────────────────── */
.vault-footer {
  text-align: center;
  margin-top: 14px;
  font-size: 11px;
  color: #d8f5f5;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}
.vault-footer a { color: #ffffff; }
.vault-footer span { opacity: 0.6; margin: 0 4px; }

.vault-footer-mini {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
}

/* ── Spinner (Sanduhr-Ersatz) ────────────────────────── */
.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--win-shadow);
  border-top-color: var(--violet);
  border-radius: 0; /* eckig, wir sind hier bei Win95 */
  animation: spin 0.9s steps(8) infinite;
  vertical-align: middle;
  margin-right: 4px;
}

.spinner.small { width: 9px; height: 9px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toasts ──────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 400;
  pointer-events: none;
}

.toast {
  background: var(--win-face);
  box-shadow: var(--bevel-out);
  padding: 8px 14px;
  font-size: 12px;
  max-width: 320px;
  border-left: 4px solid var(--violet);
  animation: toast-in 0.15s steps(3);
  color: var(--text);
}

.toast.info { border-left-color: var(--violet); }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Download-Seite (dl-page) ────────────────────────── */
.dl-shell {
  min-height: calc(100vh - 32px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3vh;
}

.dl-card { width: 100%; max-width: 480px; }
.dl-card .window-body { text-align: center; }

.dl-brand { margin-bottom: 8px; }
.dl-tagline { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

.dl-qr-toggle {
  background: var(--win-face);
  border: 0;
  box-shadow: var(--bevel-out);
  padding: 4px 12px;
  min-height: 32px;
  font-size: 12px;
  cursor: pointer;
}
.dl-qr-toggle:active { box-shadow: var(--bevel-in); }

.dl-qr-panel { margin: 10px 0; }

.dl-qr-canvas {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  display: inline-block;
  padding: 10px;
  max-width: 240px;
}
.dl-qr-canvas svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.dl-qr-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.dl-section { margin-top: 10px; }

.file-meta { font-size: 13px; color: var(--text); margin: 10px 0; word-break: break-word; }
.file-meta strong { color: var(--violet-deep); }

.error-meta { color: var(--red); }
.success-meta { color: var(--green); }

.dl-status-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: #ffffff;
  box-shadow: var(--bevel-in);
}
.dl-status-icon.success { color: var(--green); font-weight: bold; }
.dl-status-icon.error { color: var(--red); }

.dl-burn-warn {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  background: #fff3e0;
  box-shadow: var(--bevel-in);
  border-left: 4px solid #cc6600;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.dl-burn-flame { font-size: 18px; }

.dl-burned-banner {
  background: #fff3e0;
  box-shadow: var(--bevel-in);
  border-left: 4px solid #cc6600;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: left;
  line-height: 1.5;
}

.dl-fileinfo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 8px 10px;
  margin-bottom: 12px;
  text-align: left;
}

.dl-fileicon { font-size: 26px; line-height: 1; }
.dl-fileicon.big { font-size: 40px; margin-bottom: 6px; }

.dl-filetext { min-width: 0; }
.dl-filetext strong { display: block; word-break: break-all; font-size: 13px; }
.dl-filetext span { font-size: 11px; color: var(--text-muted); }

.dl-result-head { margin-bottom: 10px; }
.dl-result-name { font-weight: bold; word-break: break-all; font-size: 14px; }
.dl-result-meta { font-size: 11px; color: var(--text-muted); }

/* Previews */
.dl-preview {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 4px;
  margin-bottom: 12px;
  max-height: 340px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-preview img, .dl-preview video { max-width: 100%; max-height: 330px; display: block; }
.dl-preview.audio { flex-direction: column; gap: 8px; padding: 14px; }
.dl-audio-icon { font-size: 30px; }
.dl-preview audio { width: 100%; }
.dl-preview.pdf iframe { width: 100%; height: 330px; border: 0; }

.dl-preview.text {
  display: block;
  text-align: left;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
}
.dl-preview.text pre {
  font-family: "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.dl-nopreview {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 18px 12px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

/* VirusTotal-Box */
.dl-vt {
  border: 1px solid var(--win-shadow);
  box-shadow: 1px 1px 0 var(--win-highlight), inset 1px 1px 0 var(--win-highlight);
  padding: 8px 10px;
  margin-bottom: 12px;
  text-align: left;
}

.dl-vt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.dl-vt-title { font-size: 12px; font-weight: bold; color: var(--violet-deep); }

.dl-vt-status {
  font-size: 11px;
  padding: 1px 8px;
  box-shadow: inset 1px 1px 0 var(--win-shadow), inset -1px -1px 0 var(--win-highlight);
  color: var(--text-muted);
  white-space: nowrap;
}
.dl-vt-status.clean { color: var(--green); font-weight: bold; }
.dl-vt-status.danger { color: var(--red); font-weight: bold; }
.dl-vt-status.neutral { color: var(--text-muted); }

.dl-vt-body { font-size: 12px; line-height: 1.5; }
.dl-vt-optin { margin-bottom: 6px; }
.dl-vt-note { color: var(--text-muted); font-size: 11px; margin-bottom: 8px; }
.dl-vt-btn { font-size: 12px; }
.dl-vt-link { color: var(--violet-deep); }

/* Aktionen */
.dl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dl-actions .btn-primary { flex: 1; width: auto; min-width: 160px; }
.dl-actions .btn-ghost-sm { min-height: 44px; }

.dl-hash {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: var(--text-muted);
  word-break: break-all;
  text-align: left;
  margin-top: 4px;
}

/* Passkey-Decrypt-Hinweis */
#passkeyNote { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* Download-Seite: Kalibrierungs-Box (dl-page.js baut sie inline) */
#calibPw, #calib2fa { margin-top: 6px; }
#calibGo { margin-top: 8px; }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 600px) {
  body { padding: 8px; }

  .window-body { padding: 10px; }
  .titlebar-text { font-size: 12px; }

  .menu-item { display: none; }
  .menubar { justify-content: flex-end; }

  .admin-card-head { flex-direction: column; align-items: stretch; }
  .admin-card-head .btn-ghost { align-self: flex-start; min-height: 40px; }

  .file-table .filename { max-width: 140px; }

  /* "From" auf Handy ausblenden */
  .file-table th:nth-child(4),
  .file-table td:nth-child(4) { display: none; }

  /* Passkey-Tabelle: "Last used" ausblenden */
  .passkey-table th:nth-child(3),
  .passkey-table td:nth-child(3) { display: none; }

  .status-cell:not(.grow):nth-child(2) { display: none; }

  .btn-icon { min-height: 40px; min-width: 40px; }

  .upload-actions .btn-upload,
  .upload-actions .btn-cancel { flex: 1; }

  .nyx-dialog { max-width: none; }
  .nyx-dialog-actions button { flex: 1; }

  .dl-actions .btn-primary { min-width: 0; }
}

/* --- iOS: kein Auto-Zoom beim Fokussieren (Schrift muss >= 16px sein) --- */
input, select, textarea,
input[type="password"], input[type="text"], input[type="email"], input[type="file"] {
  font-size: 16px !important;
}
