html,
body {
  max-width: 100%;
}

body {
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

.table-responsive,
.dataTables_wrapper,
.card-body.p-0 {
  -webkit-overflow-scrolling: touch;
}

.content-wrapper,
.main-header,
.main-footer,
.wrapper {
  max-width: 100%;
}

.form-control,
.custom-select,
.btn {
  min-height: 38px;
}

#svcFrame {
  width: 100% !important;
}

@media (max-width: 991.98px) {
  body {
    overflow-x: hidden;
  }

  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .main-header .navbar-nav {
    flex-wrap: wrap;
    gap: 4px;
  }

  .main-header .navbar-nav .nav-link {
    padding: 0.45rem 0.55rem;
  }

  .main-header .btn {
    margin: 3px 0;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
  }

  .brand-link .brand-text {
    display: inline-block;
    max-width: 170px;
    font-size: 15px;
    line-height: 1.15;
    white-space: normal;
  }

  .content-header {
    padding: 10px 0.5rem;
  }

  .content-header h1,
  .content-header .m-0 {
    font-size: 20px;
    line-height: 1.25;
  }

  .breadcrumb {
    float: none !important;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 0;
  }

  .card {
    margin-bottom: 0.85rem;
    border-radius: 8px;
  }

  .card-body {
    padding: 0.85rem;
  }

  .small-box .inner,
  .info-box-content {
    padding: 12px;
  }

  .small-box h3 {
    font-size: 24px;
    line-height: 1.2;
  }

  .table-responsive,
  .dataTables_wrapper,
  .card-body.p-0 {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  table.table,
  table.dataTable,
  .table {
    width: 100% !important;
    min-width: 720px;
  }

  .table th,
  .table td,
  table.dataTable th,
  table.dataTable td {
    padding: 0.5rem;
    font-size: 13px;
    white-space: nowrap;
    vertical-align: middle;
  }

  .table td .btn,
  table.dataTable td .btn {
    margin: 2px;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .dropdown-menu-lg,
  .dropdown-menu-xl {
    min-width: auto;
    max-width: calc(100vw - 20px);
  }

  .nav-sidebar .nav-link p,
  .nav-sidebar .nav-treeview > .nav-item > .nav-link > p {
    white-space: normal;
  }

  #svcFrame {
    min-height: calc(100vh - 155px) !important;
  }

  .login-page,
  .register-page {
    align-items: flex-start;
    min-height: 100vh;
    padding: 18px 10px;
  }

  .login-box,
  .register-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .login-logo,
  .register-logo {
    font-size: 24px;
    line-height: 1.2;
  }

  .login-page .row > [class*="col-"],
  .register-page .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  .login-card-body,
  .register-card-body {
    padding: 20px;
  }

  .top .nav {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .top .nav > div:last-child {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top .nav a.btn {
    justify-content: center;
    width: 100%;
    padding: 10px 8px;
    font-size: 13px;
  }

  .hero {
    padding: 30px 14px 20px !important;
    gap: 18px !important;
  }

  .hero h1 {
    font-size: 30px !important;
  }

  .hero p {
    font-size: 15px !important;
  }

  .cta {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cta a {
    width: 100%;
    text-align: center;
  }

  .panel {
    border-radius: 12px !important;
    padding: 16px !important;
  }

  .cards {
    gap: 10px !important;
  }
}

@media (max-width: 575.98px) {
  .content-header h1,
  .content-header .m-0 {
    font-size: 18px;
  }

  .content-wrapper > .content {
    padding: 0 0.25rem;
  }

  .btn {
    white-space: normal;
  }

  .table th,
  .table td,
  table.dataTable th,
  table.dataTable td {
    font-size: 12px;
  }

  .small-box h3 {
    font-size: 21px;
  }

  .login-card-body,
  .register-card-body {
    padding: 18px;
  }

  .top .brand {
    font-size: 18px;
  }

  .top .brand i {
    width: 34px;
    height: 34px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start !important;
  }
}