/* ===== AGAT CREDIT LOGIN PAGE ===== */

/* Фон страницы */
main.view {
  background: linear-gradient(135deg, #dce8f5 0%, #e8f0fa 50%, #d4e4f0 100%) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* md-content прозрачный */
md-content.ng-cloak {
  background: transparent !important;
}

/* Убираем левую панель SOGo */
.sg-logo {
  display: none !important;
}

/* Правая панель прозрачная */
.sg-login {
  background: transparent !important;
}

/* Карточка входа */
#loginContent {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(48px) !important;
  -webkit-backdrop-filter: blur(48px) !important;
  border-radius: 40px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 68px 0 rgba(255,255,255,0.05) inset,
              0 4px 4px 0 rgba(255,255,255,0.15) inset,
              0 20px 60px rgba(0,0,0,0.08) !important;
  max-width: 460px !important;
  width: 100% !important;
  margin: auto !important;
  padding: 40px !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Кнопка войти — широкая */
.md-button.md-fab.md-accent.md-hue-2[type="submit"] {
  background-color: #FF5A42 !important;
  border-radius: 50px !important;
  width: 100% !important;
  min-width: 200px !important;
  height: 48px !important;
  box-shadow: 0 4px 20px rgba(255, 90, 66, 0.4) !important;
  transform: none !important;
}

/* Поля ввода */
md-input-container .md-input {
  border-radius: 50px !important;
  padding: 8px 16px !important;
}

md-input-container:not(.md-input-invalid).md-input-focused .md-input {
  border-color: #FF5A42 !important;
}

md-input-container:not(.md-input-invalid).md-input-focused label,
md-input-container:not(.md-input-invalid).md-input-focused md-icon {
  color: #FF5A42 !important;
}

/* Запомнить меня */
md-switch .md-bar {
  background-color: rgba(0,0,0,0.2) !important;
}

md-switch.md-checked:not([disabled]) .md-bar {
  background-color: rgba(255, 90, 66, 0.5) !important;
}

md-switch.md-checked:not([disabled]) .md-thumb {
  background-color: #FF5A42 !important;
}

/* Логотип верхний правый */

/* Логотип нижний левый */

/* Убираем чёрный фон логотипа через blend mode */

/* Запомнить имя пользователя — видимый */
md-switch .md-label,
.md-switch-label {
  color: rgba(0,0,0,0.7) !important;
  display: inline !important;
  visibility: visible !important;
}

/* screen blend mode вместо multiply */

/* Логотип верхний правый */
.ag-logo-tr {
  position: fixed !important;
  top: -80px !important;
  right: -80px !important;
  width: 350px !important;
  height: 350px !important;
  opacity: 0.9 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block !important;
}

/* Логотип нижний левый */
.ag-logo-bl {
  position: fixed !important;
  bottom: -80px !important;
  left: -80px !important;
  width: 350px !important;
  height: 350px !important;
  opacity: 0.9 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block !important;
}

.ag-logo-tr, .ag-logo-bl {
}

/* ===== brand v3: цветки по макету Figma (кадр 1440x900) ===== */
:root { --ag-u: min(calc(100vw / 1440), calc(100vh / 900)); }

.ag-logo-tr, .ag-logo-bl {
  position: fixed !important;
  width: calc(500 * var(--ag-u)) !important;
  height: calc(553 * var(--ag-u)) !important;
  object-fit: contain !important;
  opacity: 1 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
.ag-logo-tr {
  top: calc(-114.5 * var(--ag-u)) !important;
  right: calc(-103.5 * var(--ag-u)) !important;
  bottom: auto !important; left: auto !important;
  transform: rotate(90deg) !important;
}
.ag-logo-bl {
  bottom: calc(-114.5 * var(--ag-u)) !important;
  left: calc(-103.5 * var(--ag-u)) !important;
  top: auto !important; right: auto !important;
  transform: rotate(270deg) !important;
}

/* ===== brand v4: фон, стекло, карточка по макету Figma ===== */
/* Фон кадра */
main.view {
  background: radial-gradient(81.32% 208.18% at 89.86% 20.56%, rgba(201,218,246,0.8) 0%, #C9DAF6 100%), #FFFFFF !important;
}

/* Стеклянная панель 1260x740: 90px по бокам, 80px сверху/снизу */
main.view::before {
  content: "";
  position: fixed;
  top: calc(80 * var(--ag-u));
  bottom: calc(80 * var(--ag-u));
  left: calc(90 * var(--ag-u));
  right: calc(90 * var(--ag-u));
  border-radius: calc(40 * var(--ag-u));
  background: linear-gradient(105.81deg, rgba(255,255,255,0.48) 38.67%, rgba(255,255,255,0.06) 132.6%);
  border: 1px solid #FFFFFF33;
  box-shadow: 0px 4px 68px 0px #FFFFFF0D inset, 0px 4px 4px 0px #FFFFFF26 inset;
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  z-index: 1;
  pointer-events: none;
}

/* Цветки под стеклом, карточка над ним */
.ag-logo-tr, .ag-logo-bl { z-index: 0 !important; }
md-content.ng-cloak { position: relative; z-index: 2; }

/* Белая карточка 400px */
#loginContent {
  flex-direction: column !important;
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  border-radius: 40px !important;
  box-shadow: none !important;
  max-width: 400px !important;
  padding: 60px 60px 56px !important;
  box-sizing: border-box !important;
}

/* Заголовок «Вход» */
#loginContent::before {
  content: "Вход";
  display: block;
  text-align: center;
  margin: 0 0 24px 0;
  font: 600 24px/1.2 "Inter", "Fira Sans", Roboto, sans-serif;
  color: #000000;
}

/* ===== brand v6: кнопка «Войти» по центру (строка CONNECT BUTTON) ===== */
#loginContent div[layout="row"]:has(> div > [type="submit"]) {
  justify-content: center !important;
}
#loginContent div[layout="row"]:has(> div > [type="submit"]) > .md-icon-button {
  display: none !important;
}
#loginContent div[layout="row"]:has(> div > [type="submit"]) > div {
  display: flex !important;
  justify-content: center !important;
}
#loginContent [type="submit"] {
  width: 280px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
#loginContent [type="submit"] md-icon { display: none !important; }
#loginContent [type="submit"]::after {
  content: "Войти";
  font: 600 16px/1 "Inter", "Fira Sans", Roboto, sans-serif;
  color: #FFFFFF;
  text-transform: none;
}

/* ===== brand v7: форма строго по центру карточки на любой ширине ===== */
#loginContent > .sg-login {
  flex: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  align-self: stretch !important;
}
#loginContent .sg-login-content {
  width: 280px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
