:root {
  --bg-main: #041229;
  --bg-deep: #071731;
  --panel: rgba(6, 24, 58, 0.88);
  --panel-strong: rgba(8, 28, 66, 0.96);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(136, 171, 255, 0.2);
  --border-strong: rgba(71, 135, 255, 0.35);
  --text-main: #f7f9ff;
  --text-soft: #b4c4ea;
  --text-muted: #8297c7;
  --blue: #1d7dff;
  --blue-strong: #1358f2;
  --blue-soft: rgba(29, 125, 255, 0.2);
  --yellow: #ffcb1f;
  --shadow: 0 30px 60px rgba(1, 8, 22, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(31, 93, 232, 0.24), transparent 24%),
    radial-gradient(circle at bottom right, rgba(30, 125, 255, 0.16), transparent 26%),
    linear-gradient(145deg, #010a17 0%, var(--bg-main) 36%, #051633 100%);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(380px, 0.82fr);
  overflow: hidden;
}

.showcase-panel,
.login-panel {
  position: relative;
}

.showcase-panel {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 34px 42px 30px 38px;
  border-right: 1px solid rgba(133, 168, 248, 0.14);
  background:
    radial-gradient(circle at 20% 18%, rgba(39, 132, 255, 0.2), transparent 25%),
    radial-gradient(circle at 78% 74%, rgba(22, 91, 214, 0.16), transparent 28%),
    linear-gradient(115deg, rgba(3, 16, 39, 0.96) 0%, rgba(4, 18, 45, 0.9) 42%, rgba(2, 15, 38, 0.96) 100%),
    linear-gradient(180deg, rgba(4, 19, 48, 0.98), rgba(2, 15, 38, 0.98));
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(1, 11, 29, 0.12) 0%, rgba(1, 11, 29, 0.04) 34%, rgba(1, 11, 29, 0.16) 100%);
  pointer-events: none;
}

.showcase-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  display: grid;
  gap: 22px;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "benefits"
    "footer";
}

.brand-row,
.showcase-copy,
.benefits-grid,
.showcase-footer {
  position: relative;
  z-index: 1;
}

.brand-row {
  position: absolute;
  top: 30px;
  left: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row-logo {
  width: 32px;
}

.brand-row-divider {
  width: 1px;
  height: 26px;
  background: rgba(180, 196, 234, 0.42);
}

.brand-row-name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.showcase-copy {
  grid-area: copy;
  max-width: 390px;
  margin-top: 0;
}

.showcase-copy h1 {
  margin: 0 0 16px;
  font-size: 1.8rem;
  line-height: 1.16;
}

.showcase-copy span {
  color: #2ba4ff;
}

.showcase-copy p {
  margin: 0;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 360px;
}

.benefits-grid {
  grid-area: benefits;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.benefit-card {
  min-height: 96px;
  padding: 0 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  text-align: center;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin: 0 auto 10px;
  background: rgba(23, 107, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(59, 134, 255, 0.18);
}

.benefit-icon svg,
.footer-avatar svg,
.brand-signature svg,
.input-shell svg,
.password-toggle svg,
.primary-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-icon svg {
  color: #5cb2ff;
}

.benefit-card span {
  display: block;
  color: var(--text-main);
  font-size: 0.78rem;
  line-height: 1.45;
}

.showcase-footer {
  grid-area: footer;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(142, 170, 243, 0.16);
  margin-top: 2px;
}

.footer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7abfff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(123, 172, 255, 0.14);
}

.footer-profile small,
.credit-box small {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.footer-profile strong,
.credit-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.footer-profile:first-child strong,
.credit-box:first-child strong {
  color: #33a2ff;
}

.footer-profile:last-child strong,
.credit-box:last-child strong {
  color: var(--yellow);
}

.footer-profile span {
  color: var(--text-main);
  font-size: 0.7rem;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(32, 101, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(3, 16, 39, 0.92), rgba(3, 16, 39, 0.98));
}

.login-card {
  width: min(100%, 460px);
  padding: 32px 30px 26px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(7, 27, 60, 0.96), rgba(5, 19, 45, 0.98));
  box-shadow: var(--shadow);
}

.login-header h2 {
  margin: 0;
  font-size: 2rem;
}

.login-header p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.header-accent {
  width: 58px;
  height: 4px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1485ff, #4db5ff);
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(140, 172, 241, 0.14);
}

.role-option {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.role-option svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-option.is-active {
  color: #f8fbff;
  background: linear-gradient(90deg, var(--blue-strong), var(--blue));
  border-color: rgba(62, 129, 255, 0.5);
  box-shadow: 0 10px 22px rgba(19, 88, 242, 0.22);
}

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

.field > span {
  font-size: 0.88rem;
  font-weight: 600;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(140, 172, 241, 0.2);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.input-shell:focus-within {
  border-color: rgba(40, 136, 255, 0.58);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.input-shell svg {
  color: #f0f4ff;
  opacity: 0.9;
  flex: 0 0 24px;
}

.input-shell input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  outline: none;
}

.input-shell input::placeholder {
  color: #7f93bf;
}

.password-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  color: #f4f7ff;
  cursor: pointer;
  opacity: 0.86;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  font-size: 0.86rem;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.text-link {
  color: #17a0ff;
  text-decoration: none;
  font-size: 0.86rem;
}

.primary-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: none;
  border-radius: 14px;
  color: #f8fbff;
  background: linear-gradient(90deg, var(--blue-strong), var(--blue));
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 20px 36px rgba(19, 88, 242, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(19, 88, 242, 0.34);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.form-message.error {
  color: #ff9d9d;
}

.form-message.success {
  color: #69c1ff;
}

.mobile-credits,
.mobile-signature {
  display: none;
}

.desktop-signature {
  margin-top: 18px;
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid rgba(140, 172, 241, 0.12);
}

.desktop-signature span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.desktop-signature small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

@media (max-width: 1260px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  }

  .showcase-inner {
    width: min(100%, 480px);
  }

  .showcase-panel {
    padding: 24px 22px 22px 24px;
    background:
      radial-gradient(circle at 20% 18%, rgba(39, 132, 255, 0.18), transparent 25%),
      radial-gradient(circle at 78% 74%, rgba(22, 91, 214, 0.14), transparent 28%),
      linear-gradient(115deg, rgba(3, 16, 39, 0.96) 0%, rgba(4, 18, 45, 0.9) 42%, rgba(2, 15, 38, 0.96) 100%),
      linear-gradient(180deg, rgba(4, 19, 48, 0.98), rgba(2, 15, 38, 0.98));
  }

  .brand-row {
    top: 24px;
    left: 24px;
  }

  .brand-row-logo {
    width: 34px;
  }

  .brand-row-name {
    font-size: 0.88rem;
  }

  .showcase-copy {
    max-width: 320px;
  }

  .showcase-copy h1 {
    font-size: 1.4rem;
  }

  .showcase-copy p {
    font-size: 0.8rem;
    max-width: 300px;
  }

  .benefits-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-card span {
    font-size: 0.72rem;
  }

  .login-card {
    width: min(100%, 410px);
    padding: 28px 24px 22px;
  }

  .login-header h2 {
    font-size: 1.72rem;
  }

  .login-header p {
    font-size: 0.86rem;
  }

  .login-form {
    gap: 16px;
    margin-top: 24px;
  }

  .role-option {
    min-height: 46px;
  }

  .input-shell {
    min-height: 54px;
  }

  .primary-button {
    min-height: 54px;
    font-size: 0.88rem;
  }
}

@media (min-width: 1500px) {
  .page-shell {
    grid-template-columns: minmax(700px, 1fr) minmax(400px, 0.82fr);
  }

  .showcase-panel {
    padding-left: 42px;
    background:
      radial-gradient(circle at 20% 18%, rgba(39, 132, 255, 0.2), transparent 25%),
      radial-gradient(circle at 78% 74%, rgba(22, 91, 214, 0.16), transparent 28%),
      linear-gradient(115deg, rgba(3, 16, 39, 0.96) 0%, rgba(4, 18, 45, 0.9) 42%, rgba(2, 15, 38, 0.96) 100%),
      linear-gradient(180deg, rgba(4, 19, 48, 0.98), rgba(2, 15, 38, 0.98));
  }

  .showcase-inner {
    width: min(100%, 600px);
  }
}

@media (max-width: 980px) {
  body {
    display: block;
    padding: 0;
  }

  .page-shell {
    width: 100%;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  .showcase-panel {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 24px 18px;
  }

  .login-card {
    width: min(100%, 420px);
    padding: 28px 22px 22px;
    border-radius: 24px;
    background:
      radial-gradient(circle at top right, rgba(27, 117, 255, 0.12), transparent 28%),
      linear-gradient(180deg, rgba(6, 24, 57, 0.98), rgba(3, 16, 39, 0.98));
  }

  .mobile-credits,
  .mobile-signature {
    display: block;
  }

  .desktop-brand {
    display: none;
  }

  .desktop-signature {
    display: none;
  }

  .login-header h2 {
    font-size: 1.85rem;
  }

  .login-header p {
    font-size: 0.92rem;
  }

  .login-form {
    gap: 18px;
    margin-top: 30px;
  }

  .role-switch {
    gap: 6px;
    padding: 3px;
    border-radius: 12px;
  }

  .role-option {
    min-height: 40px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .role-option svg {
    width: 14px;
    height: 14px;
  }

  .field {
    gap: 10px;
  }

  .field > span {
    font-size: 0.9rem;
  }

  .input-shell {
    min-height: 54px;
    gap: 10px;
    padding: 0 14px;
    border-radius: 12px;
  }

  .input-shell svg,
  .password-toggle svg {
    width: 19px;
    height: 19px;
  }

  .input-shell input,
  .checkbox,
  .text-link,
  .form-message {
    font-size: 0.82rem;
  }

  .form-row {
    gap: 10px;
  }

  .primary-button {
    min-height: 48px;
    border-radius: 10px;
    font-size: 0.84rem;
  }

  .primary-button svg {
    width: 18px;
    height: 18px;
  }

  .mobile-credits {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(132, 164, 232, 0.14);
  }

  .credit-box {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(140, 172, 241, 0.08);
  }

  .credit-box small {
    font-size: 0.68rem;
  }

  .credit-box strong {
    margin-bottom: 0;
    font-size: 0.85rem;
  }

  .mobile-signature {
    margin-top: 16px;
    text-align: center;
  }

  .mobile-signature span {
    margin-bottom: 5px;
    font-size: 0.78rem;
  }

  .mobile-signature small {
    font-size: 0.7rem;
  }
}

@media (max-width: 420px) {
  .login-panel {
    padding: 12px;
  }

  .login-card {
    width: 100%;
    min-height: calc(100vh - 24px);
    padding: 20px 16px 18px;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }

  .header-accent {
    width: 58px;
    height: 4px;
    margin-top: 16px;
  }

  .form-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .checkbox {
    gap: 8px;
  }

  .text-link {
    white-space: nowrap;
  }
}
