:root {
  --menv-accent: #00b894;
  --menv-bg: #ffffff;
  --menv-surface: #f7f9fa;
  --menv-text: #1a202c;
  --menv-text-muted: #8895a7;
  --menv-border: #e5e9ee;
}
:root[data-menv-theme="dark"] {
  --menv-bg: #1a1f2b;
  --menv-surface: #232a38;
  --menv-text: #f1f5f9;
  --menv-text-muted: #9ca3af;
  --menv-border: #333c4d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: transparent;
}

.menv-file { padding: 8px; }

.menv-file-loading,
.menv-file-empty,
.menv-file-error {
  text-align: center;
  padding: 24px 12px;
  color: var(--menv-text-muted, #8895a7);
  font-size: 0.9rem;
}

.menv-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menv-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--menv-bg);
  border: 1px solid var(--menv-border);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.menv-file-row:hover { border-color: var(--menv-accent); }

.menv-file-icon {
  width: 46px;
  height: 46px;
  position: relative;
  border-radius: 12px;
  background: var(--menv-surface);
  background: color-mix(in srgb, var(--menv-file-color) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menv-file-icon svg { display: block; width: 28px; height: 35px; }
.menv-file-ext {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.menv-file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.menv-file-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--menv-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menv-file-type {
  font-size: 0.75rem;
  color: var(--menv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.menv-file-action {
  flex-shrink: 0;
  background: var(--menv-accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 18px;
  border-radius: 999px;
}
.menv-file-row:hover .menv-file-action { opacity: 0.9; }
