:root {
  color-scheme: light;
  font-family: Tahoma, "Microsoft YaHei", Arial, sans-serif;
  background: #008080;
  color: #000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 16px;
  background: #008080;
  font-size: 13px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-width: 76px;
  min-height: 24px;
  padding: 2px 10px;
  color: #000;
  background: #c0c0c0;
  border: 2px outset #fff;
}

button:active {
  border-style: inset;
}

button:disabled {
  color: #777;
  text-shadow: 1px 1px #eee;
}

input,
textarea {
  width: 100%;
  padding: 3px 5px;
  background: #fff;
  border: 2px inset #d4d0c8;
  outline: none;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.vb-window {
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 #000;
}

.login-window {
  width: min(380px, calc(100vw - 32px));
  margin: 12vh auto 0;
}

.app-window {
  width: min(1180px, calc(100vw - 32px));
  height: calc(100vh - 32px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.title-bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(90deg, #000080, #1084d0);
}

.window-buttons {
  display: inline-flex;
  gap: 3px;
}

.window-buttons i {
  width: 16px;
  height: 16px;
  display: block;
  background: #c0c0c0;
  border: 2px outset #fff;
}

.login-body,
.toolbar,
.status-bar,
.pane,
.groupbox,
.vb-dialog form {
  border: 2px inset #fff;
}

.login-body {
  padding: 18px;
}

.login-body label,
.vb-dialog label {
  display: block;
  margin-bottom: 12px;
}

.message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #800000;
}

.toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.main-grid {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 8px;
  padding: 8px;
}

.pane {
  min-height: 0;
  background: #d4d0c8;
  display: flex;
  flex-direction: column;
}

.pane-title {
  padding: 5px 7px;
  font-weight: 700;
  border-bottom: 2px outset #fff;
}

.listbox {
  min-height: 0;
  flex: 1;
  margin: 6px;
  overflow: auto;
  background: #fff;
  border: 2px inset #d4d0c8;
}

.list-item {
  padding: 6px 7px;
  border-bottom: 1px solid #d4d0c8;
  cursor: default;
}

.list-item.selected {
  color: #fff;
  background: #000080;
}

.muted {
  color: #555;
}

.workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.8fr);
  gap: 8px;
  padding: 8px;
}

.groupbox {
  position: relative;
  min-height: 0;
  padding: 18px 8px 8px;
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
}

.legend {
  position: absolute;
  top: -8px;
  left: 10px;
  padding: 0 5px;
  background: #c0c0c0;
  font-weight: 700;
}

.course-list {
  min-height: 0;
  overflow: auto;
}

.course-card {
  margin-bottom: 8px;
  padding: 8px;
  background: #d4d0c8;
  border: 2px outset #fff;
}

.course-header {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.course-title {
  font-weight: 700;
}

.course-actions,
.video-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.video-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  margin-top: 5px;
  background: #fff;
  border: 2px inset #d4d0c8;
}

.video-meta {
  min-width: 0;
}

.video-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pending {
  color: #804000;
}

.status-uploaded {
  color: #006000;
}

video {
  width: 100%;
  min-height: 220px;
  background: #000;
  border: 2px inset #d4d0c8;
}

.hint {
  margin-top: 8px;
  color: #333;
}

.status-bar {
  height: 26px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 7px;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.vb-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 2px 2px 0 #000;
}

.vb-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.vb-dialog form {
  padding: 12px;
}

.dialog-title {
  margin: -12px -12px 12px;
  padding: 5px 7px;
  color: #fff;
  font-weight: 700;
  background: #000080;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  body {
    padding: 8px;
  }

  .app-window {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .main-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .classroom-pane {
    min-height: 190px;
  }
}
