:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #172033;
  background: #f6f8fb;
}

body {
  margin: 0;
}

a {
  color: #2367d1;
  text-decoration: none;
}

button,
.button {
  border: 1px solid #b8c2d6;
  background: #fff;
  border-radius: 6px;
  color: #172033;
  cursor: pointer;
  padding: 8px 12px;
}

button[type="submit"],
#chooseFilesButton {
  background: #2367d1;
  border-color: #2367d1;
  color: white;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.danger {
  border-color: #d54f4f;
  color: #c22f2f;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e3e8f2;
  display: flex;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  color: #172033;
  font-size: 20px;
  font-weight: 700;
}

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

.topbar form {
  margin: 0;
}

.page {
  margin: 0 auto;
  max-width: 1280px;
  padding: 24px;
}

.split {
  display: grid;
  gap: 24px;
  grid-template-columns: 290px minmax(0, 1fr);
}

.sidebar,
.content,
.panel,
.auth-panel {
  background: #fff;
  border: 1px solid #e3e8f2;
  border-radius: 8px;
  padding: 20px;
}

.section-title,
.folder-header,
.upload-toolbar,
.table-header,
.summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.folder-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 50px;
}

button.icon-button,
button.row-icon-button {
  background: transparent;
  border: 0;
  color: inherit;
}

.icon-button img,
.row-icon-button img {
  display: block;
  height: 46px;
  object-fit: contain;
  width: 46px;
}

.icon-button .active-icon,
.icon-button:disabled .inactive-icon {
  display: block;
}

.icon-button .inactive-icon,
.icon-button:disabled .active-icon {
  display: none;
}

.row-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.row-icon-button img {
  height: 32px;
  width: 32px;
}

.folder-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.folder-row {
  align-items: center;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  color: #172033;
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.folder-row.active {
  border-color: #2367d1;
  background: #eef4ff;
}

.inline-form,
.user-create {
  display: flex;
  gap: 8px;
}

input,
select,
textarea {
  border: 1px solid #b8c2d6;
  border-radius: 6px;
  box-sizing: border-box;
  padding: 9px 10px;
}

.stack {
  display: grid;
  gap: 14px;
}

.auth-panel {
  max-width: 420px;
  margin: 60px auto;
}

.auth-panel label {
  display: grid;
  gap: 6px;
}

.link-button {
  border: 0;
  color: #2367d1;
}

.upload-panel {
  border-top: 1px solid #e3e8f2;
  margin-top: 20px;
  padding-top: 20px;
}

.is-hidden {
  display: none;
}

.dropzone {
  align-items: center;
  border: 2px dashed #c8d0df;
  border-radius: 8px;
  color: #6d7788;
  display: flex;
  height: 160px;
  justify-content: center;
  margin: 16px 0;
}

.dropzone.dragover {
  background: #eef4ff;
  border-color: #2367d1;
}

.progress-wrap {
  background: #e6ecf5;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin: 14px 0;
}

#overallProgressBar {
  background: #2367d1;
  height: 100%;
  width: 0;
}

.queue {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.queue-row {
  align-items: center;
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.queue-row small {
  color: #6d7788;
  display: block;
  margin-top: 4px;
}

.uploaded {
  color: #157347;
}

.failed {
  color: #c22f2f;
}

.uploading {
  color: #2367d1;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e3e8f2;
  padding: 11px 8px;
  text-align: left;
}

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

.stacked-actions {
  align-items: flex-start;
}

.actions form {
  margin: 0;
}

.folder-checks {
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
}

.folder-checks label {
  align-items: center;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.folder-checks.compact {
  border: 1px solid #e3e8f2;
  border-radius: 6px;
  padding: 8px;
}

.hint {
  color: #6d7788;
  margin: 12px 0 18px;
}

.users-table td {
  vertical-align: top;
}

.alert {
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 12px;
}

.success {
  background: #e9f7ef;
  color: #146c43;
}

.error {
  background: #fdecec;
  color: #b02a37;
}

.empty {
  text-align: center;
  padding: 80px 20px;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }

  .folder-header,
  .upload-toolbar,
  .summary,
  .user-create {
    align-items: stretch;
    flex-direction: column;
  }
}
