html, body, #app {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent body scroll, let app handle it */
}

* {
  box-sizing: border-box;
}

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
}

/* Mobile-friendly tables: horizontal scroll without breaking page width */
.table-scroll-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  .responsive-dialog.el-dialog {
    width: 92% !important;
    max-width: 100%;
    margin: 5vh auto !important;
  }

  .responsive-dialog .el-dialog__footer .el-button + .el-button {
    margin-left: 0;
  }

  .responsive-dialog .el-form-item {
    display: block;
  }

  .responsive-dialog .el-form-item__content {
    margin-left: 0 !important;
  }

  .responsive-dialog .el-form-item__label {
    width: 100% !important;
    text-align: left;
    justify-content: flex-start;
    margin-bottom: 4px;
  }

  .toolbar-responsive {
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar-responsive .el-button,
  .toolbar-responsive .el-upload {
    margin-left: 0 !important;
  }
}
