html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f6f7f9;
}

.card {
  border-radius: 0.6rem;
}

th, td {
  font-size: 0.88rem;
}
.login-header {
    text-align: center;
    margin-bottom: 15px;
}
.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(122, 141, 255, 0.28) 0%, rgba(122, 141, 255, 0) 42%),
    radial-gradient(circle at 78% 82%, rgba(120, 74, 191, 0.24) 0%, rgba(120, 74, 191, 0) 40%),
    linear-gradient(135deg, #7382ea 0%, #6c65d0 46%, #7054bf 100%);
}

.auth-body::before {
  content: "";
  position: absolute;
  left: -18%;
  bottom: -22%;
  width: 58vw;
  height: 58vw;
  min-width: 360px;
  min-height: 360px;
  background: linear-gradient(135deg, rgba(135, 164, 255, 0.35), rgba(120, 118, 229, 0.08));
  transform: rotate(32deg);
  clip-path: polygon(0 100%, 100% 50%, 100% 100%);
  z-index: 0;
}

.auth-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
  z-index: 0;
}
.auth-panel {
  width: min(860px, 94vw);
  border-radius: 24px;
  overflow: hidden;
  background: #eef1f7;
  box-shadow: 0 24px 65px rgba(25, 25, 60, 0.4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

.login-panel .auth-left {
  display: grid;
  place-items: center;
  padding: 34px;
  background: linear-gradient(90deg, #d8dde8 0%, #eceef4 100%);
}

.robot-container {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
}

.auth-image {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  background-image: url('https://images.unsplash.com/photo-1677442135136-760c813028c0?auto=format&fit=crop&w=900&q=80');
  background-size: cover;
  background-position: center;
  border-radius: 6px;
}

.auth-right {
  padding: 24px 38px;
  background: #f4f5f7;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-logo {
  width: min(420px, 100%);
  margin: 0 auto 18px;
  display: block;
}

.auth-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: #ffd447;
  border: 3px solid #2f74dc;
  font-size: 31px;
}

.user-avatar {
  display: flex;
  justify-content: center;
}

.user-avatar-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffd447;
  border: 3px solid #2f74dc;
  display: grid;
  place-items: center;
  font-size: 30px;
}

.auth-input {
  height: 48px;
  border-radius: 12px;
  border: 2px solid #cfd7e3;
  padding-inline: 15px;
  font-size: 18px;
}

.auth-btn {
  height: 50px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(90deg, #2c4dbc 0%, #3f7ee8 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 9px 18px rgba(54, 104, 220, 0.35);
}

.auth-footer {
  grid-column: 1 / 3;
  background: #1f2b45;
  color: #fff;
  text-align: center;
  padding: 15px 10px;
  font-size: 15px;
}

.context-panel {
  position: relative;
  width: min(520px, 92vw);
  background: #f4f5f7;
  border-radius: 24px;
  box-shadow: 0 22px 52px rgba(18, 26, 75, 0.34);
  padding: 28px 40px 40px;
  z-index: 1;
}

.context-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  background: #f04a4a;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.context-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  background: #ffd447;
  border: 3px solid #2f74dc;
  font-size: 32px;
}

.context-label {
  font-size: 16px;
  font-weight: 700;
  color: #4b5568;
  letter-spacing: 0.6px;
  margin-bottom: 11px;
  display: block;
}

.app-shell {
  margin: 0;
  min-height: 100vh;
  background: #f3f4f6;
  display: flex;
  position: relative;
}

.sidebar-backdrop {
  display: none;
}

.app-sidebar {
  width: 230px;
  background: #1e2b41;
  color: #fff;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: width 0.22s ease;
}

.app-logo {
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px 14px;
  letter-spacing: 1px;
}

.app-sidebar a {
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.app-sidebar a:hover {
  background: #2a3b58;
}

.nav-icon {
  width: 18px;
  display: inline-block;
  text-align: center;
  font-weight: 700;
}

.nav-label {
  display: inline-block;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: 54px;
  background: #fff;
  border-bottom: 1px solid #dde2ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.menu-icon-btn {
  border: 1px solid #d6dce6;
  background: #fff;
  color: #36455f;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 20px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chip {
  border: 1px solid #d8dde5;
  border-radius: 6px;
  background: #f7f8fb;
  padding: 6px 10px;
  font-size: 13px;
  color: #2b3f5b;
}

.user-chip {
  font-weight: 700;
  text-transform: uppercase;
}

.app-content {
  flex: 1;
  padding: 16px;
  overflow-x: auto;
}

.dashboard-blank {
  min-height: calc(100vh - 86px);
  background: #fff;
  border: 1px solid #edf0f4;
}

.sidebar-collapsed .app-sidebar {
  width: 68px;
}

.sidebar-collapsed .app-logo {
  text-align: center;
  padding-inline: 0;
  font-size: 12px;
}

.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .app-sidebar a {
  justify-content: center;
  padding-inline: 0;
}

@media (max-width: 900px) {
  .auth-panel {
    grid-template-columns: 1fr;
    width: min(560px, 94vw);
  }

  .auth-footer {
    grid-column: 1 / 2;
    font-size: 13px;
  }

  .login-panel .auth-left {
    display: none;
  }

  .auth-right {
    padding: 20px 18px;
  }

  .login-logo {
    width: min(300px, 100%);
    margin-bottom: 12px;
  }

  .auth-avatar {
    width: 54px;
    height: 54px;
    font-size: 24px;
    margin-bottom: 12px;
  }

  .auth-input {
    height: 44px;
    font-size: 16px;
  }

  .context-panel {
    width: min(560px, 94vw);
    padding: 20px 16px 24px;
    border-radius: 18px;
  }

  .context-label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .app-sidebar {
    position: fixed;
    z-index: 1100;
    top: 0;
    left: 0;
    bottom: 0;
    width: 230px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }

  .sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: 0 8px 24px rgba(11, 15, 30, 0.4);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(11, 15, 30, 0.35);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-topbar {
    height: auto;
    min-height: 54px;
    padding: 8px 10px;
    gap: 8px;
    align-items: flex-start;
  }

  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .chip {
    font-size: 12px;
    padding: 5px 8px;
  }

  .app-content {
    padding: 10px;
  }

  .card-header h5 {
    font-size: 1rem;
  }

  .table {
    min-width: 680px;
  }

  .dashboard-blank {
    min-height: calc(100vh - 76px);
  }
}

@media (max-width: 420px) {
  .auth-btn {
    height: 46px;
  }

  .topbar-right .chip:first-child {
    display: none;
  }
}
