:root {
  --bg: #101713;
  --panel: #17211b;
  --panel-2: #1d2a22;
  --line: #2e4034;
  --cream: #f4f1e8;
  --muted: #aeb9ad;
  --accent: #a7bc6c;
  --accent-dark: #263d30;
  --danger: #e08989;
  --shadow: 0 18px 60px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(167, 188, 108, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(167, 188, 108, .06), transparent 55%),
    var(--bg);
  color: var(--cream);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }

.brand {
  font-weight: 800;
  letter-spacing: -1px;
  font-size: 30px;
  line-height: 1;
}
.brand span { color: var(--accent); }
.brand.small { font-size: 22px; }
.muted { color: var(--muted); }
.fine { color: #7f8d80; font-size: 12px; margin: 14px 0 0; }
.error { color: var(--danger); min-height: 22px; margin: 12px 0 0; }
.status { color: var(--muted); min-height: 22px; margin: 0 0 12px; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(430px, 100%);
  background: linear-gradient(180deg, rgba(29, 42, 34, .96), rgba(23, 33, 27, .98));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 38px 34px 26px;
  box-shadow: var(--shadow);
}
.login-card .brand { margin-bottom: 10px; }
label { display: block; margin: 18px 0 7px; font-size: 14px; color: var(--muted); }
input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid #3a4d3f;
  background: #0f1712;
  color: var(--cream);
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167, 188, 108, .16); }
.login-card button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  background: var(--accent);
  color: #182014;
  font-weight: 700;
  text-decoration: none;
}
.login-card button { width: 100%; margin-top: 24px; }
.login-card button:disabled { opacity: .6; cursor: wait; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(16, 23, 19, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.top-actions { display: flex; align-items: center; gap: 16px; }
.shell { max-width: 1180px; margin: 0 auto; padding: 28px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 40px; }
.breadcrumb button {
  background: transparent;
  border: 0;
  color: var(--cream);
  padding: 6px 4px;
}
.breadcrumb button:hover { color: var(--accent); }
.breadcrumb .sep { color: #5d6d60; }
.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.upload-button { cursor: pointer; }
.dropzone {
  display: grid;
  gap: 2px;
  place-items: center;
  border: 1px dashed #465b4b;
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 18px;
  color: var(--muted);
  background: rgba(29, 42, 34, .35);
  transition: border-color .15s, background .15s;
}
.dropzone strong { color: var(--cream); }
.dropzone.drag { border-color: var(--accent); background: rgba(167, 188, 108, .08); }

.folders { display: grid; gap: 8px; margin-bottom: 10px; }
.folder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--cream);
  padding: 13px 16px;
}
.folder-row:hover { border-color: var(--accent); }
.folder-icon { color: var(--accent); font-size: 20px; width: 24px; text-align: center; }

.files { display: grid; gap: 8px; }
.file-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.file-icon { color: var(--accent); font-size: 20px; text-align: center; }
.file-main { min-width: 0; }
.file-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: 12px; }
.file-actions { display: flex; gap: 8px; align-items: center; }
.file-actions a, .file-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  border-radius: 8px;
  padding: 7px 10px;
  text-decoration: none;
  font-size: 13px;
}
.file-actions a:hover, .file-actions button:hover { border-color: var(--accent); color: var(--accent); }
.file-actions .danger:hover { border-color: var(--danger); color: var(--danger); }

.footer {
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 18px 28px 30px;
  border-top: 1px solid var(--line);
  color: #7f8d80;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .topbar { padding: 14px 16px; }
  .shell { padding: 18px 14px; }
  .file-row { grid-template-columns: 30px minmax(0, 1fr); }
  .file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .toolbar { align-items: flex-start; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .button, .toolbar-actions .ghost { flex: 1; }
  .brand.small { font-size: 18px; }
  .top-actions .muted { display: none; }
}
