:root {
  --ink: #1c2635;
  --muted: #687487;
  --line: #e7ebef;
  --paper: #fff;
  --wash: #f7f9fb;
  --accent: #276ef1;
  --accent2: #e9f0ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--wash);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
button,
.button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 10px 15px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.quiet {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}
.danger {
  background: #b42318;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top right, #d8e7ff, transparent 40%), #f7f9fb;
}
.login-card {
  width: min(430px, calc(100vw - 32px));
  padding: 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 70px #283d5817;
  text-align: center;
}
.mark {
  height: 36px;
  width: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #276ef1, #65a7ff);
  color: white;
  font-weight: 800;
}
.login-card .mark {
  margin: auto;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--muted);
  margin: 14px 0 5px;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
h1 {
  font-size: 2.2rem;
  margin: 0.1em 0;
}
h2 {
  margin: 0;
  font-size: 1.5rem;
}
form {
  text-align: left;
  margin-top: 30px;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 15px 0;
}
input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #cfd7e1;
  border-radius: 9px;
  font: inherit;
}
form button {
  width: 100%;
  margin-top: 10px;
}
.error {
  min-height: 1.2em;
  color: #b42318;
  font-size: 0.9rem;
}
header {
  height: 68px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
}
.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.layout {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 68px);
}
aside {
  padding: 28px 18px;
  border-right: 1px solid var(--line);
}
nav {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}
.area {
  width: 100%;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 10px;
  border-radius: 8px;
}
.area.active {
  background: var(--accent2);
  color: #1657d3;
}
.content {
  padding: 34px;
  min-width: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.toolbar-actions input {
  display: none;
}
.select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
}
.select-all input,
.file-select input {
  display: inline-block;
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.dropzone {
  border: 2px dashed #a8bbd7;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: #3967a6;
  background: #eff5ff;
  margin: 24px 0;
}
.dropzone.is-uploading {
  text-align: left;
}
.upload-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.upload-progress-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
}
.upload-progress-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-progress progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
.upload-progress-status {
  min-width: 62px;
  text-align: right;
  font-weight: 700;
}
.upload-progress-status.complete {
  color: #127a43;
}
.upload-progress-status.failed {
  color: #b42318;
}
.is-disabled {
  cursor: wait;
  opacity: 0.6;
  pointer-events: none;
}
.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-right: 0.45em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: -0.05em;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.items {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 150px;
  cursor: pointer;
}
.thumb {
  height: 120px;
  background: #eef2f7;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-icon {
  font-size: 2rem;
}
.card-body {
  padding: 11px;
}
.name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.folder {
  background: linear-gradient(145deg, #fff, #f4f8ff);
}
.folder .thumb {
  background: #eaf1ff;
  color: #276ef1;
}
.menu {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 8px;
  padding: 4px 8px;
  background: #ffffffd9;
  color: var(--ink);
}
.file-select {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  padding: 4px 7px;
  background: #ffffffd9;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.empty {
  grid-column: 1/-1;
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed #cfd7e1;
  border-radius: 16px;
  color: var(--muted);
}
dialog {
  width: min(1000px, 96vw);
  max-height: 94vh;
  border: 0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 70px #0007;
}
.close {
  float: right;
  background: #182231;
}
#preview-content img,
#preview-content video {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: auto;
}
@media (max-width: 720px) {
  header {
    padding: 0 16px;
  }
  .layout {
    display: block;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }
  aside .eyebrow {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  .area {
    white-space: nowrap;
    width: auto;
  }
  .content {
    padding: 22px 16px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .header-actions #identity {
    display: none;
  }
  .items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
