body {
  min-height: 100vh;
  background: #f5f7fb;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)),
    #111827;
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.16);
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand span,
.sidebar-user span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.sidebar-logo,
.sidebar-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
}

.sidebar-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d6efd, #20c997);
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.32);
  letter-spacing: 0.04em;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 650;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transform: translateX(2px);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.95), rgba(32, 201, 151, 0.78));
  box-shadow: 0 14px 28px rgba(13, 110, 253, 0.2);
}

.sidebar-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active .sidebar-icon {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user strong,
.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.app-main {
  margin-left: 268px;
  padding: 32px;
}

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(13, 110, 253, 0.18), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(32, 201, 151, 0.14), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef4f8 100%);
}

.auth-card {
  width: min(420px, 100%);
}

.login-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  align-items: stretch;
}

.login-brand-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(13, 110, 253, 0.82)),
    #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  position: relative;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 260px;
  height: 260px;
  border: 42px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.login-brand-mark {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.26);
}

.login-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-kicker {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
}

.login-brand-panel h1 {
  max-width: 500px;
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.login-brand-panel p {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}

.login-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.login-highlights span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.login-card {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.login-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.login-card h2 {
  font-size: 34px;
}

.login-form {
  gap: 18px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.field-row.no-reveal {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
}

.field-row input,
.field-row textarea {
  background: #f8f9fa;
}

.field-row textarea {
  min-height: 72px;
}

.input-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.input-copy.secret-copy {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.input-copy textarea {
  min-height: 92px;
}

.autocomplete-shell {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.autocomplete-option {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #172033;
  text-align: left;
  font: inherit;
}

.autocomplete-option:hover,
.autocomplete-option:focus {
  background: #eef5ff;
  outline: none;
}

.autocomplete-empty {
  padding: 10px 12px;
  color: #6c757d;
  font-size: 14px;
}

.reveal-password-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 38px;
  padding-inline: 10px;
}

.reveal-password-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.reveal-password-button .reveal-icon-hidden {
  display: none;
}

.reveal-password-button[aria-pressed="true"] .reveal-icon-visible {
  display: none;
}

.reveal-password-button[aria-pressed="true"] .reveal-icon-hidden {
  display: inline-flex;
}

.copy-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 38px;
  padding-inline: 10px;
}

.copy-button svg {
  width: 25px;
  height: 25px;
}

.copy-button .copy-back,
.copy-button .copy-front,
.copy-button .copy-check {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-button .copy-back {
  opacity: 0.75;
}

.copy-button .copy-check {
  color: #6f42c1;
}

.copy-button.is-copied {
  color: #6f42c1;
  border-color: #6f42c1;
  background: #f4efff;
}

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

input:not([type="submit"]),
select,
textarea {
  width: 100%;
}

@media (max-width: 880px) {
  .sidebar {
    position: static;
    width: auto;
    border-radius: 0 0 20px 20px;
  }

  .app-main {
    margin-left: 0;
    padding: 20px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-header {
    display: grid;
  }

  .field-row,
  .field-row.no-reveal,
  .input-copy,
  .input-copy.secret-copy {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 320px;
    padding: 28px;
  }

  .login-brand-mark {
    width: 86px;
    height: 86px;
    border-radius: 22px;
  }

  .login-brand-panel h1 {
    font-size: 30px;
  }

  .login-brand-panel p {
    font-size: 15px;
  }

  .login-card .card-body {
    padding: 28px;
  }
}
