@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --auth-bg: #f4eff1;
  --auth-surface: #fffdfd;
  --auth-raised: #ffffff;
  --auth-muted-surface: rgba(248, 242, 244, .9);
  --auth-hover: #f2e8eb;
  --auth-text: #21171a;
  --auth-text-soft: #3d3035;
  --auth-muted: #5a4b52;
  --auth-subtle: #706168;
  --auth-border: rgba(64, 31, 41, .1);
  --auth-border-strong: rgba(64, 31, 41, .18);
  --auth-primary: #c92f49;
  --auth-primary-soft: rgba(201, 47, 73, .1);
  --auth-primary-border: rgba(201, 47, 73, .25);
  --auth-focus: rgba(201, 47, 73, .2);
  --auth-overlay-start: rgba(244, 239, 241, .58);
  --auth-overlay-end: rgba(244, 239, 241, .46);
  --auth-shell-bg: rgba(255, 253, 253, .96);
  --auth-transition: 180ms cubic-bezier(.22, 1, .36, 1);
}

:root.dark {
  --auth-bg: #080506;
  --auth-surface: #151012;
  --auth-raised: #1a1215;
  --auth-muted-surface: rgba(29, 21, 24, .86);
  --auth-hover: #271a1f;
  --auth-text: #fffafa;
  --auth-text-soft: #d8d0d2;
  --auth-muted: #aaa1a4;
  --auth-subtle: #766b6f;
  --auth-border: rgba(255, 255, 255, .09);
  --auth-border-strong: rgba(255, 255, 255, .15);
  --auth-primary: #ff5b70;
  --auth-primary-soft: rgba(255, 64, 88, .13);
  --auth-primary-border: rgba(255, 91, 112, .3);
  --auth-focus: rgba(255, 91, 112, .18);
  --auth-overlay-start: rgba(3, 2, 4, .7);
  --auth-overlay-end: rgba(10, 5, 8, .62);
  --auth-shell-bg: rgba(21, 16, 18, .93);
}

html { min-width: 320px; min-height: 100%; background: var(--auth-bg); }
body.pw-auth-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    linear-gradient(135deg, var(--auth-overlay-start), var(--auth-overlay-end)),
    url('https://lk.ariuspw.ru/css/bg.jpg') center / cover fixed no-repeat;
  font: 400 15px/1.55 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pw-auth-page *, .pw-auth-page *::before, .pw-auth-page *::after { box-sizing: border-box; }
.pw-auth-page a { color: var(--auth-primary); text-decoration: none; }
.pw-auth-page a:focus-visible, .pw-auth-page button:focus-visible, .pw-auth-page input:focus-visible, .pw-auth-page select:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 2px; }

.pw-auth-page > .container-fluid, .pw-auth-page > .container-fluid > .row-fluid { width: 100%; min-height: 100vh; margin: 0; padding: 0; }
.pw-auth-page > .container-fluid > .row-fluid { display: flex; align-items: center; justify-content: center; }

.pw-auth-shell, #container.pw-auth-shell {
  position: relative;
  width: min(528px, calc(100% - 32px));
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 32px;
  overflow: visible;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  color: var(--auth-text);
  background: var(--auth-shell-bg);
  box-shadow: 0 32px 90px rgba(32, 12, 18, .3);
  backdrop-filter: blur(22px) saturate(125%);
  text-align: left;
  animation: auth-panel-in 280ms cubic-bezier(.22, 1, .36, 1) both;
}
body.pw-register-page { padding: 72px 24px 80px; }
.pw-register-page .pw-auth-shell { width: min(528px, 100%); }

.pw-auth-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 0; border: 0; }
.pw-auth-brand__mark { position: relative; flex: 0 0 48px; width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--auth-primary-border); border-radius: 16px; background: linear-gradient(145deg, var(--auth-primary-soft), rgba(255, 91, 112, .08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 14px 38px rgba(47, 23, 30, .16); }
.pw-auth-brand__mark img { position: absolute; top: 50%; left: 50%; display: block; width: 38px; height: 38px; margin: 0; transform: translate(-50%, -50%); object-fit: contain; }
.pw-auth-brand__copy { min-width: 0; }
.pw-auth-brand__title { overflow: hidden; color: var(--auth-text); font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.pw-auth-brand__subtitle { margin-top: 2px; color: var(--auth-muted); font-size: 12px; line-height: 1.4; }

.pw-auth-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.pw-auth-tabs { display: inline-flex; width: auto; align-items: center; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--auth-border); border-radius: 999px; background: var(--auth-muted-surface); list-style: none; }
.pw-auth-tabs li { flex: 0 0 auto; margin: 0; }
.pw-auth-tabs a { display: inline-flex; min-height: 36px; padding: 7px 14px; align-items: center; justify-content: center; border-radius: 999px; color: var(--auth-muted); font-size: 13px; font-weight: 700; line-height: 1.4; transition: background-color var(--auth-transition), color var(--auth-transition), box-shadow var(--auth-transition); }
.pw-auth-tabs a:hover { color: var(--auth-text); }
.pw-auth-tabs li.is-active a { color: var(--auth-primary); background: var(--auth-raised); box-shadow: 0 1px 2px rgba(47, 23, 30, .12); }

.pw-auth-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pw-auth-tool { display: inline-flex; min-width: 40px; height: 40px; margin: 0; padding: 0 10px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--auth-border); border-radius: 999px; color: var(--auth-muted); background: var(--auth-muted-surface); box-shadow: none; }
.pw-auth-tool svg { width: 17px; height: 17px; color: var(--auth-primary); }
.pw-auth-tool img { display: block; width: 18px; height: auto; margin: 0; border-radius: 3px; }
.pw-auth-tool span { color: var(--auth-text-soft); font-size: 11px; font-weight: 700; }
.pw-auth-tool.cp-theme-toggle { cursor: pointer; }
.cp-theme-moon { display: none; }
:root.light .cp-theme-sun { display: none; }
:root.light .cp-theme-moon { display: block; }

.pw-auth-content { margin: 0; padding: 0; }
.pw-auth-page form, .pw-auth-page .welcome { width: auto; height: auto; margin: 0; padding: 0; background: none; }
.pw-auth-field { min-width: 0; margin: 0 0 16px; }
.pw-auth-field label { display: block; width: auto; height: auto; margin: 0 0 7px; padding: 0; float: none; color: var(--auth-text-soft); background: none; font-size: 12px; font-weight: 700; line-height: 1.45; text-align: left; }
.pw-auth-input-wrap { position: relative; min-width: 0; margin: 0; }
.pw-auth-input-wrap > svg { position: absolute; z-index: 2; top: 50%; left: 15px; width: 18px; height: 18px; color: var(--auth-subtle); pointer-events: none; transform: translateY(-50%); transition: color var(--auth-transition); }
.pw-auth-input-wrap:focus-within > svg { color: var(--auth-primary); }
.pw-auth-input-wrap > .pw-auth-password-toggle { position: absolute; z-index: 3; top: 50%; right: 7px; display: grid; width: 36px; height: 36px; margin: 0; padding: 0; place-items: center; border: 0; border-radius: 50%; color: var(--auth-subtle); background: transparent; cursor: pointer; transform: translateY(-50%); }
.pw-auth-password-toggle:hover { color: var(--auth-primary); background: var(--auth-primary-soft); }
.pw-auth-password-toggle svg { width: 17px; height: 17px; }

.pw-auth-page .pw-auth-input, .pw-auth-page input.pw-auth-input, .pw-auth-page select.pw-auth-input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 11px 42px 11px 46px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 12px;
  outline: 0;
  color: var(--auth-text);
  background-color: var(--auth-muted-surface);
  box-shadow: none;
  font: 500 14px/1.45 'Manrope', sans-serif;
  appearance: none;
  transition: border-color var(--auth-transition), background-color var(--auth-transition), box-shadow var(--auth-transition);
}
.pw-auth-page select.pw-auth-input { padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--auth-muted) 50%), linear-gradient(135deg, var(--auth-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.pw-auth-page .pw-auth-input::placeholder { color: var(--auth-subtle); opacity: 1; }
.pw-auth-page .pw-auth-input:hover { background-color: var(--auth-hover); }
.pw-auth-page .pw-auth-input:focus { border-color: var(--auth-primary); background-color: var(--auth-raised); box-shadow: 0 0 0 3px var(--auth-focus); }

.pw-auth-options, .pw-auth-rules { display: flex; margin: 18px 0; align-items: flex-start; gap: 9px; }
.pw-auth-options .checker, .pw-auth-options .checker span, .pw-auth-rules .checker, .pw-auth-rules .checker span { display: contents !important; width: auto !important; height: auto !important; overflow: visible !important; opacity: 1 !important; background: none !important; }
.pw-auth-check, .pw-auth-rules label { position: relative; display: inline-flex; width: auto !important; min-width: 0; min-height: 22px; margin: 0 !important; padding: 0 !important; align-items: flex-start; color: var(--auth-muted); background: none !important; font-size: 13px; line-height: 1.45; cursor: pointer; user-select: none; float: none !important; }
.pw-auth-check::before, .pw-auth-check::after, .pw-auth-rules label::before, .pw-auth-rules label::after { display: none !important; content: none !important; }
.pw-auth-page .pw-auth-options input[type='checkbox'], .pw-auth-page .pw-auth-rules input[type='checkbox'] {
  position: relative !important;
  right: auto !important;
  left: 0 !important;
  display: inline-grid !important;
  flex: 0 0 19px;
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-content: center;
  border: 1px solid var(--auth-border-strong) !important;
  border-radius: 5px !important;
  opacity: 1 !important;
  outline: 0;
  background: var(--auth-muted-surface) !important;
  background-image: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto !important;
  cursor: pointer;
}
.pw-auth-page .pw-auth-options input[type='checkbox']::after, .pw-auth-page .pw-auth-rules input[type='checkbox']::after { width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; content: ''; opacity: 0; transform: rotate(45deg) scale(.7); transition: opacity var(--auth-transition), transform var(--auth-transition); }
.pw-auth-page .pw-auth-options input[type='checkbox']:checked, .pw-auth-page .pw-auth-rules input[type='checkbox']:checked { border-color: var(--auth-primary) !important; background: var(--auth-primary) !important; box-shadow: 0 0 0 3px var(--auth-focus) !important; }
.pw-auth-page .pw-auth-options input[type='checkbox']:checked::after, .pw-auth-page .pw-auth-rules input[type='checkbox']:checked::after { opacity: 1; transform: rotate(45deg) scale(1); }
.pw-auth-options > .pw-auth-check { flex: 0 0 auto; white-space: nowrap; }
.pw-auth-page .pw-auth-options > label.pw-auth-check {
  position: relative !important;
  display: inline-flex !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center;
  float: none !important;
  line-height: 19px !important;
  white-space: nowrap;
  background: none !important;
}

.pw-auth-submit, .pw-auth-page button.pw-auth-submit {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  margin: 6px 0 0;
  padding: 12px 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary), #ff7589);
  box-shadow: 0 10px 24px rgba(255, 91, 112, .24);
  font: 700 14px/1.45 'Manrope', sans-serif;
  cursor: pointer;
  transition: transform var(--auth-transition), filter var(--auth-transition), box-shadow var(--auth-transition);
}
.pw-auth-submit:hover { filter: saturate(1.08) brightness(1.04); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255, 91, 112, .3); }
.pw-auth-submit:active { transform: scale(.99); }
.pw-auth-submit svg { display: none; }
.pw-auth-forgot { display: block; margin-top: 18px; color: var(--auth-muted) !important; font-size: 13px; font-weight: 600; text-align: center; }
.pw-auth-forgot:hover { color: var(--auth-primary) !important; }
.pw-auth-secondary { margin-top: 16px; color: var(--auth-muted); font-size: 12px; text-align: center; }
.pw-auth-secondary a { font-weight: 700; }

.pw-auth-form-grid { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.pw-auth-help, .pw-auth-page .help-block { display: block; margin: 6px 0 0; color: var(--auth-subtle); font-size: 10px; line-height: 1.45; }
.pw-auth-page .pstrength-minchar { display: none; }
.pw-auth-page .pstrength-info { margin-top: 5px; font-size: 10px; }
.pw-auth-page .pstrength-bar { max-width: 100%; border: 0 !important; border-radius: 4px; }
.pw-auth-rules { position: relative; margin: 18px 0; color: var(--auth-muted); font-size: 13px; }
.pw-auth-rules input { position: absolute !important; }
.pw-auth-rules label { position: relative; display: block; min-height: 22px; margin: 0 !important; padding: 0 0 0 29px; color: var(--auth-muted); font-size: 13px; font-weight: 500; cursor: pointer; }
.pw-auth-captcha { margin: 18px 0; padding: 12px; overflow: hidden; border: 1px solid var(--auth-border); border-radius: 12px; background: var(--auth-muted-surface); }
.pw-auth-captcha .center { max-width: 100%; overflow: hidden; }
.pw-auth-captcha .inputc { width: min(150px, 100%); height: 40px; margin: 0 8px 8px 0; padding: 8px 10px; border: 1px solid var(--auth-border); border-radius: 8px; color: var(--auth-text); background: var(--auth-raised); }
.pw-auth-captcha #image { max-width: 100%; height: 40px; border-radius: 6px; vertical-align: top; cursor: pointer; }

.pw-auth-page .alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--auth-border); border-radius: 12px; color: var(--auth-text-soft); background: var(--auth-muted-surface); text-shadow: none; }
.pw-auth-page .alert-error, .pw-auth-page .alert-danger { border-color: var(--auth-primary-border); color: #ffb1bc; background: var(--auth-primary-soft); }
.pw-auth-page .alert-success { border-color: rgba(74, 222, 128, .3); color: #bbf7d0; background: rgba(74, 222, 128, .09); }
.pw-auth-page .alert-info { border-color: rgba(255, 91, 112, .25); color: var(--auth-text-soft); background: var(--auth-primary-soft); }

.pw-auth-back { position: fixed; z-index: 5; bottom: 24px; left: 48px; display: inline-flex; min-height: 40px; padding: 9px 13px; align-items: center; gap: 8px; border-radius: 999px; color: var(--auth-muted) !important; font-size: 13px; font-weight: 600; transition: color var(--auth-transition), background var(--auth-transition); }
.pw-auth-back:hover { color: var(--auth-primary) !important; background: var(--auth-hover); }
.pw-auth-back svg { width: 16px; height: 16px; }

.pw-auth-page .translator { display: none; }
#footer.pw-auth-footer, .pw-auth-footer { display: none !important; }

@keyframes auth-panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 560px) {
  body.pw-auth-page { background-attachment: scroll; }
  .pw-auth-page > .container-fluid > .row-fluid { align-items: flex-start; padding: 72px 13px 80px; }
  .pw-auth-shell, #container.pw-auth-shell { width: 100%; padding: 20px; border-radius: 20px; }
  body.pw-register-page { padding: 72px 13px 80px; }
  .pw-register-page .pw-auth-shell { width: 100%; }
  .pw-auth-brand { margin-bottom: 20px; padding-right: 84px; }
  .pw-auth-header { display: block; margin-bottom: 22px; }
  .pw-auth-tabs { width: 100%; }
  .pw-auth-tabs li { flex: 1 1 50%; }
  .pw-auth-tabs a { width: 100%; padding-right: 9px; padding-left: 9px; }
  .pw-auth-tools { position: absolute; top: 20px; right: 20px; gap: 6px; }
  .pw-auth-tool { min-width: 38px; height: 38px; padding: 0 9px; }
  .pw-auth-tool span { display: none; }
  .pw-auth-page .pw-auth-input { font-size: 16px; }
  .pw-auth-back { bottom: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .pw-register-page .pw-auth-back { position: static; display: flex; width: max-content; margin: 16px auto 0; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-auth-page *, .pw-auth-page *::before, .pw-auth-page *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
