*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.login-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  background: #0f172a;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-shell {
  display: flex;
  width: 100%;
  max-width: 1200px;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.banner-side {
  flex: 1;
  display: none;
}

.banner-side img {
  max-height: 70vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.banner-side--left {
  text-align: right;
}

.banner-side--right {
  text-align: left;
}

.login-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
}

.top-banner {
  margin-bottom: 20px;
  text-align: center;
}

.top-banner img {
  max-width: 400px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #141414;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 10;
}

.login-card__head {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #334155;
  padding: 16px 24px;
}

.login-card__brand {
  text-align: center;
}

.login-card__logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
}

.login-card__title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.login-card__body {
  padding: 24px;
}

.login-error {
  background: #fff;
  color: #cf1322;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #ffa39e;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: #141414;
  border: 1px solid #424242;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}

.input-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.input-prefix svg {
  width: 14px;
  height: 14px;
}

.form-input {
  flex: 1;
  height: 40px;
  border: 0;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  padding: 0 11px 0 0;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.remember-row {
  margin-bottom: 24px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: #1677ff;
  cursor: pointer;
}

.btn-login {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: #1677ff;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #4096ff;
}

.btn-login:active {
  background: #0958d9;
}

.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.downloads {
  margin-top: 15px;
  text-align: center;
  border-top: 1px dashed #334155;
  padding-top: 10px;
}

.downloads__label {
  color: #ccc;
  margin-bottom: 5px;
  font-size: 12px;
}

.downloads__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e293b;
  padding: 4px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  border: 1px solid #334155;
  transition: border-color 0.2s, color 0.2s;
}

.download-link:hover {
  color: #1677ff;
  border-color: #1677ff;
}

.download-link svg {
  width: 12px;
  height: 12px;
}

@media (min-width: 1024px) {
  .banner-side {
    display: block;
  }
}

@media (max-width: 767px) {
  .login-page {
    padding: 10px;
  }
}

@media (max-width: 479px) {
  .login-center {
    width: 100%;
  }

  .login-card__title {
    font-size: 18px;
  }
}
