:root {
  --bg-1: #0c1a2d;
  --bg-2: #132d46;
  --bg-3: #0a6c74;
  --accent-1: #0f8b8d;
  --accent-2: #13b0a5;
  --text-main: #12263a;
  --text-soft: #7c8fa3;
  --surface: rgba(255, 255, 255, 0.95);
  --border: #d8e3ee;
  --radius-xl: 34px;
  --radius-lg: 16px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

body.login-page::before,
body.login-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

body.login-page::before {
  width: 280px;
  height: 280px;
  background: rgba(27, 183, 166, 0.35);
  top: 40px;
  left: 40px;
}

body.login-page::after {
  width: 380px;
  height: 380px;
  background: rgba(77, 208, 225, 0.2);
  bottom: 20px;
  right: 20px;
}

.login-wrap {
  width: min(100%, 560px);
  position: relative;
  z-index: 1;
}

.login-footer-cta {
  margin-top: 14px;
  text-align: center;
}

.login-footer-btn {
  display: inline-block;
  width: 100%;
  text-decoration: none;
  text-align: center;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(90deg, #1c5f94 0%, #2f7fbf 100%);
  box-shadow: 0 8px 20px rgba(28, 95, 148, 0.35);
}

.login-footer-btn:hover {
  filter: brightness(1.06);
  color: #ffffff;
}

.login-logo {
  text-align: center;
  font-size: clamp(1.5rem, 2.3vw, 2.3rem);
  font-weight: 700;
  color: #eaf4ff;
  margin: 0 0 24px;
  letter-spacing: 0.02em;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4.2vw, 44px);
  box-shadow: 0 22px 48px rgba(8, 31, 49, 0.32);
  backdrop-filter: blur(8px);
}

.login-icon {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: #0d2a42;
  display: grid;
  place-items: center;
  position: relative;
}

.login-icon::before,
.login-icon::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  height: 6px;
  border-radius: 8px;
  background: #51d0c6;
}

.login-icon::before {
  top: 36px;
  box-shadow: 0 15px 0 #51d0c6;
}

.login-icon::after {
  top: 66px;
  right: 42px;
}

.login-title {
  text-align: center;
  margin: 0 0 22px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
}

.login-language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.lang-form {
  margin: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: #3b5269;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 7px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  font-weight: 800;
  background: #eef4fb;
  color: #32506c;
}

.lang-btn.active .lang-flag {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.lang-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.lang-btn.active {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
  box-shadow: 0 8px 20px rgba(15, 139, 141, 0.25);
}

.role-switch {
  background: #e7eef5;
  border-radius: var(--radius-lg);
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.role-switch button {
  border: 0;
  background: transparent;
  border-radius: 13px;
  padding: 12px 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #5a6e82;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-switch button.active {
  color: #fff;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-input {
  width: 100%;
  height: 58px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 1rem;
  color: var(--text-main);
  background: #fff;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.16);
}

.password-row {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #8ea2b8;
  font-size: 0.95rem;
  cursor: pointer;
}

.login-btn {
  margin-top: 8px;
  width: 100%;
  height: 62px;
  border: 0;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.login-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  body.login-page {
    padding: 16px;
  }

  .login-card {
    border-radius: 24px;
    padding: 24px 18px;
  }

  .login-input,
  .login-btn {
    height: 56px;
  }

  .lang-btn {
    height: 52px;
    font-size: 1rem;
  }
}
