:root {
  --paper-width: 210mm;
  --paper-height: 297mm;
  --paper-inner-height: 296.7mm;
  --paper-padding: 1.5cm 1cm;
  --preview-bg: #f3f4f6;
}

body {
  margin: 0;
  background: var(--preview-bg);
}

.app-shell {
  margin: 0;
  min-height: 100vh;
}

.control-pane {
  max-height: 100vh;
  overflow: auto;
  padding: 0.75rem;
  border-right: 1px solid #d8dee4;
  background: #fff;
}

.preview-pane {
  padding: 0.75rem;
  overflow: auto;
}

.panels-wrap {
  margin-top: 0.75rem;
}

.panel-section {
  display: block;
}

.panel-section.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.compact-columns {
  margin: 0;
}

.compact-columns > .column {
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}

.room-editor-buttons {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
}

.room-tool-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.room-seat-input-group {
  max-width: 7rem;
}

.room-seat-input-group .form-input {
  min-width: 2rem;
}

.room-tool-row .btn,
.room-seat-input-group .form-input {
  min-height: 2rem;
}

.hour-card .card-body {
  padding: 0.5rem;
}

.hour-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hour-card-header .btn-link {
  padding: 0;
}

.steps-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.step-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.room-grid {
  display: grid;
  grid-template-columns: var(
    --room-grid-template,
    repeat(var(--room-columns), minmax(2.2rem, 1fr))
  );
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.room-editor-bottom-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.room-editor-bottom-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid #e1e7ef;
  border-radius: 0.2rem;
  background: #fafbfd;
}

.room-editor-bottom-group .btn {
  padding: 0.1rem 0.2rem;
}

.room-cell {
  border: 1px solid #bcc3ce;
  min-height: 2.2rem;
  background: #fff;
  border-radius: 0.2rem;
  font-size: 0.75rem;
}

.room-seat {
  background: #e8f2ff;
  border-color: #6da7f3;
  font-weight: 700;
}

.room-space {
  background: #f0f7ef;
  border-style: dashed;
  border-color: #89b885;
  font-size: xx-small;
}

.room-empty {
  background: #f7f8fa;
  color: #9ea7b3;
}

.table-scroll {
  overflow: auto;
  max-height: 65vh;
}

.compact-table-scroll {
  max-height: 38vh;
}

.students-table-wrap {
  overflow-x: auto;
}

.students-table-wrap tr[data-action="drag-student-row"] {
  cursor: move;
}

.students-table-wrap .table td {
  border-bottom: none;
}

.catalog-textarea {
  min-height: 60vh;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.catalog-textarea[readonly] {
  background: #f7f8fa;
  color: #5f6b7a;
}

.catalog-source-switch {
  min-width: 14rem;
}

.catalog-text-diagnostics {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  max-height: 10rem;
  overflow: auto;
}

.student-seat-cell {
  white-space: nowrap;
}

.student-drag-handle {
  display: inline-block;
  margin-right: 0.35rem;
  opacity: 0.5;
}

.student-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.status-line {
  margin-top: 0.5rem;
  color: #66758c;
  min-height: 1.5rem;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.paper-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.5rem;
}

.page {
  width: var(--paper-width);
  height: var(--paper-inner-height);
  background: #fff;
  border: 1px solid #cfd6df;
  box-shadow: 0 3px 14px rgba(46, 61, 73, 0.15);
}

.content {
  width: 100%;
  height: 100%;
  padding: var(--paper-padding);
}

.f-between {
  display: flex;
  justify-content: space-between;
}

.header {
  font-weight: 400;
  margin-bottom: 0.5rem;
  /* height: 2.5rem; */
  overflow: hidden;
}

.windows {
  margin-bottom: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 2rem 1fr;
  gap: 0.5rem;
}

.room-left,
.url {
  font-size: 70%;
}

.url {
  text-align: right;
}

.layout {
  display: grid;
  grid-template-columns: var(
    --layout-grid-template,
    repeat(var(--layout-columns), minmax(0, 1fr))
  );
  gap: 0.5rem;
  height: 23.5cm;
  margin-bottom: 0.5rem;
}

.layout-space,
.layout-empty {
  width: 100%;
  height: 100%;
}

.table-card {
  border: 1px solid #111;
  width: 100%;
  height: 100%;
  padding: 1rem;
  position: relative;
}

.number {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 1px solid #ccc;
  min-width: 1.45rem;
  text-align: center;
  font-size: 0.8rem;
}

.name {
  font-weight: 600;
  font-size: 1rem;
  margin-top: -0.25rem;
}

.surname {
  /* margin-top: 0.2rem; */
}

.info {
  margin-top: 0.45rem;
  font-size: 80%;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.table-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  height: 1.5rem;
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.table-bottom-left {
  display: inline-flex;
  gap: 0.5rem;
}

.attendance {
  width: 1rem;
  border: 1px solid #ccc;
  height: 1rem;
  line-height: 0.8rem;
  font-size: 1rem;
  margin-top: 0.4rem;
  text-align: center;
}

.check-mark {
  display: inline-block;
  font-size: 0.8rem;
  line-height: 0.8rem;
}

.diamond-wrap {
  width: 1rem;
  text-align: center;
}

.diamond-wrap svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.entry-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2rem 1fr 1fr;
  gap: 0.5rem;
  font-size: 70%;
}

.entry-label {
  text-align: left;
}

.entry-right {
  text-align: right;
}

.empty-preview {
  border: 1px dashed #b2bcc9;
  border-radius: 0.25rem;
  height: 70vh;
  display: grid;
  place-items: center;
  color: #73839b;
}

.small {
  font-size: 0.75rem;
}

.mt-big,
.divider.mt-big {
  margin-top: 2rem;
}

.top-tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.top-tabs {
  margin: 0;
  width: auto;
  display: inline-flex;
  flex: 0 0 auto;
}

.top-tabs .tab-item {
  flex: 0 0 auto;
  text-align: left;
}

.hour-search-trigger-row {
  position: relative;
}

.hour-search-trigger {
  cursor: pointer;
  background: #fff;
  padding-right: 2rem;
}

.hour-search-icon {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  pointer-events: none;
  background: #f7f8f9;
  padding-left: 0.5rem;
}

.hour-search-icon svg {
  width: 0.92rem;
  height: 0.92rem;
  display: block;
}

.hour-search-clear {
  padding-left: 0;
}

.hour-search-modal .modal-container {
  width: min(980px, calc(100vw - 2rem));
  max-width: 980px;
}

.hour-search-modal .modal-body {
  max-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hour-search-modal [data-hour-search-input="true"] {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.hour-search-subtitle {
  margin-top: 0.2rem;
}

.hour-search-table-wrap {
  max-height: 62vh;
  border: 1px solid #d8dee4;
  border-radius: 0.2rem;
}

.hour-search-table-wrap table {
  margin-bottom: 0;
}

.hour-search-table-wrap tbody tr {
  cursor: pointer;
}

.hour-search-table-wrap tbody tr:hover {
  background: #f3f7ff;
}

.hour-search-table-wrap .hour-search-row-active {
  background: #e8f1ff;
}

.hour-search-table-wrap .hour-search-row-new td {
  font-weight: 600;
  color: #2a3a57;
}

@media screen and (max-width: 960px) {
  .top-tabs-row {
    justify-content: flex-start;
  }

  .control-pane {
    border-right: none;
    border-bottom: 1px solid #d8dee4;
    max-height: none;
  }

  .table-scroll {
    max-height: 45vh;
  }

  .room-seat-input-group {
    min-width: 100%;
  }

  .hour-search-modal .modal-container {
    width: calc(100vw - 1rem);
  }
}

@media print {
  html,
  body,
  .paper-wrap,
  .page,
  .content {
    margin: 0 !important;
    padding: 0 !important;
  }

  @page {
    margin: 0 !important;
    size: var(--paper-width) var(--paper-height);
  }

  .noprint {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .preview-pane {
    padding: 0 !important;
  }

  .paper-wrap {
    display: block !important;
  }

  .page {
    border: none !important;
    box-shadow: none !important;
    width: var(--paper-width) !important;
    height: var(--paper-inner-height) !important;
  }

  .content {
    width: 100%;
    height: 100%;
    padding: var(--paper-padding) !important;
  }
}
