:root {
    --bg-card: var(--obs-surface-container-high);
    --text-main: var(--obs-on-surface);
    --text-muted: var(--obs-on-surface-variant);
    --border-input: rgba(144,143,160,0.06);
    --border-focus: var(--obs-primary);
    --btn-main-bg: var(--obs-primary);
    --btn-main-text: #ffffff;
    --btn-main-hover: #6f71ff;
}

.auth-card {
    align-self: center;
    justify-self: center;
    justify-content: center;
    background-color: var(--bg-card);
    color: var(--text-main);
    width: calc(100% - 32px);
    min-width: fit-content;
    max-width: 500px;
    padding: 24px;
    border-radius: var(--r-lg);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
    margin: 0 16px;
}

@media (min-width: 768px) {
  .auth-card {
      width: 50vh;
      max-width: 50vh;
  }
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.auth-title {
    font-size: 20px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--btn-main-bg);
    border: 1px solid rgba(128,131,255,0.12);
    padding: 0 12px;
    height: 32px;
    border-radius: var(--r);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(128,131,255,0.06);
}

.icon-back {
    width: 16px;
    height: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.input-group label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.input-group input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-input);
    color: var(--text-main);
    padding: 4px 0;
    font-size: 16px;
    outline: none;
    width: 100%;
    transition: border-color 0.3s ease;
    font-family: "YandexRegular", var(--font-body) !important;
    background-color: transparent;
    color-scheme: dark;
}

.input-group.yandex-thin input {
    font-family: "YandexThin" !important;
}

/* Эффект подчеркивания при фокусе, как в Quasar */
.input-group input:focus {
    border-bottom: 2px solid var(--border-focus);
    padding-bottom: 3px; /* Компенсация толщины рамки, чтобы контент не прыгал */
}

/* Сброс стилей автозаполнения браузера */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:autofill,
.input-group input:autofill:hover,
.input-group input:autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:autofill,
input:autofill:hover,
input:autofill:focus {
    -webkit-text-fill-color: var(--text-main) !important;
    color: var(--text-main) !important;
    font-family: "YandexThin" !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
    box-shadow: 0 0 0px 1000px transparent inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset !important;
}

input:-internal-autofill-selected {
    background-color: var(--bg-card) !important;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: auto;
}

.password-wrapper input {
    padding-right: 32px; /* Место под иконку глаза */
}

.btn-toggle-password {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    color: var(--btn-main-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password svg {
    width: 20px;
    height: 20px;
}

.btn-submit {
    background: var(--btn-main-bg);
    color: var(--btn-main-text);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--r);
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    margin-top: 8px;
    box-shadow: none;
}

.btn-submit:hover {
    background: var(--btn-main-hover);
    border-color: rgba(0,0,0,0.06);
}

.btn-submit:active {
    background: rgba(59, 130, 246, 0.35);
}