/* =====================================================================
   ДИЗАЙНКОД — Авторизация v5.6
   Минималистичный подвал, SVG-тогглы, фикс видимости текста
   ===================================================================== */

.dk-auth-page {
    --dk-primary: #4361ee;
    --dk-primary-dark: #3a56d4;
    --dk-secondary: #7209b7;
    --dk-gradient: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    --dk-danger: #ef476f;
    --dk-success: #10b981;
    --dk-warning: #f59e0b;

    --dk-gray-50: #f5f6fa;
    --dk-gray-100: #f0f1f6;
    --dk-gray-200: #e9ecf2;
    --dk-gray-300: #d1d5db;
    --dk-gray-400: #9ca3af;
    --dk-gray-500: #6b7280;
    --dk-gray-600: #4b5563;
    --dk-gray-700: #374151;
    --dk-gray-800: #1f2937;
    --dk-gray-900: #212529;

    --dk-radius: 12px;
    --dk-shadow-card: 0 20px 50px -15px rgba(67, 97, 238, 0.15),
                      0 8px 20px -10px rgba(15, 23, 42, 0.05);
    --dk-shadow-btn: 0 6px 16px -6px rgba(67, 97, 238, 0.5);
}

/* RESET + БАЗА */
.dk-auth-page,
.dk-auth-page *,
.dk-auth-page *::before,
.dk-auth-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dk-auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dk-gray-50);
    color: var(--dk-gray-800);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.dk-auth-page a { text-decoration: none; color: inherit; }
.dk-auth-page button { font-family: inherit; cursor: pointer; }
.dk-auth-page input { font-family: inherit; }

/* ============ КНОПКА "НА ГЛАВНУЮ" ============ */
.dk-back-btn {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: #ffffff;
    color: var(--dk-gray-700);
    border: 1px solid var(--dk-gray-200);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
}

.dk-back-btn svg {
    transition: transform 0.2s ease;
}

.dk-back-btn:hover {
    color: var(--dk-primary);
    border-color: var(--dk-primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(67, 97, 238, 0.25);
}

.dk-back-btn:hover svg {
    transform: translateX(-3px);
}

/* ============ ОСНОВНОЙ БЛОК ============ */
.dk-auth-main {
    flex: 1;
    min-height: calc(100vh - 78px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 3rem;
    background:
        radial-gradient(900px 500px at 50% -15%, rgba(67, 97, 238, 0.08), transparent 65%),
        radial-gradient(700px 400px at 100% 110%, rgba(114, 9, 183, 0.07), transparent 60%),
        var(--dk-gray-50);
}

/* ============ КАРТОЧКА ============ */
.dk-auth-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid var(--dk-gray-200);
    border-radius: 20px;
    padding: 2.4rem 2.2rem 2rem;
    box-shadow: var(--dk-shadow-card);
    position: relative;
    overflow: hidden;
    animation: dkCardIn 0.4s ease-out;
}

.dk-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--dk-gradient);
}

@keyframes dkCardIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ БРЕНД ============ */
.dk-auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.dk-auth-brand-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dk-gradient);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 10px 24px -8px rgba(67, 97, 238, 0.5);
}

.dk-auth-brand-icon svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.dk-auth-brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
    background: var(--dk-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.dk-auth-brand-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--dk-gray-500);
}

/* ============ ТАБЫ ============ */
.dk-tabs {
    position: relative;
    display: flex;
    background: var(--dk-gray-100);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.75rem;
}

.auth-tab {
    flex: 1;
    padding: 0.7rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dk-gray-500);
    transition: color 0.2s;
    position: relative;
    z-index: 2;
}

.auth-tab:hover:not(.active) { color: var(--dk-primary); }
.auth-tab.active { color: var(--dk-primary); }

.auth-tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: #ffffff;
    border-radius: 9px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.auth-tab-indicator.right { transform: translateX(100%); }

/* ============ ФОРМЫ ============ */
.auth-form { display: none; }

.auth-form.active {
    display: block;
    animation: dkFormIn 0.3s ease-out;
}

@keyframes dkFormIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dk-form-head {
    text-align: center;
    margin-bottom: 1.3rem;
}

.dk-form-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dk-gray-900);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
}

.h-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.12), rgba(114, 9, 183, 0.12));
    border-radius: 50%;
    color: var(--dk-primary);
    flex-shrink: 0;
    transform: translateY(-1px);
}

.h-icon svg {
    width: 0.95em;
    height: 0.95em;
}

.dk-form-head p {
    font-size: 0.84rem;
    color: var(--dk-gray-500);
    line-height: 1.5;
}

/* ============ ПОЛЯ ============ */
.form-group {
    margin-bottom: 0.95rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dk-gray-700);
    margin-bottom: 0.4rem;
}

.input-wrapper {
    position: relative;
    display: block;
}

.input-wrapper[data-icon] input {
    padding-left: 2.75rem;
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 18px 18px;
}

.input-wrapper[data-icon="mail"] input {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

.input-wrapper[data-icon="lock"] input {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.input-wrapper[data-icon="user"] input {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.input-wrapper[data-icon="mail"] input:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

.input-wrapper[data-icon="lock"] input:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.input-wrapper[data-icon="user"] input:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.input-wrapper input {
    width: 100%;
    padding: 0.78rem 1rem;
    border: 1.5px solid var(--dk-gray-200);
    border-radius: 11px;
    font-size: 0.94rem;
    color: var(--dk-gray-900);
    background-color: #ffffff;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
    line-height: 1.4;
}

.input-wrapper input::placeholder { color: #b4b9c4; }

.input-wrapper input:hover:not(:focus):not(.input-error):not(.input-success) {
    border-color: var(--dk-gray-300);
}

.input-wrapper input:focus {
    border-color: var(--dk-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.13);
}

.input-wrapper input.input-error {
    border-color: var(--dk-danger);
    box-shadow: 0 0 0 3px rgba(239, 71, 111, 0.1);
}

.input-wrapper input.input-success {
    border-color: var(--dk-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ============ ТОГГЛ ПАРОЛЯ (SVG) ============ */
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--dk-gray-400);
    transition: color 0.18s, background 0.18s;
    padding: 0;
    cursor: pointer;
    z-index: 5;
}

.toggle-password svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    pointer-events: none;
    transition: transform 0.15s ease;
}

.toggle-password:hover {
    color: var(--dk-primary);
    background: rgba(67, 97, 238, 0.08);
}

.toggle-password:active svg {
    transform: scale(0.9);
}

.toggle-password.revealed { color: var(--dk-primary); }

/* ============ СКРЫТЬ НАТИВНЫЕ КНОПКИ БРАУЗЕРА ============ */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
    width: 0;
    height: 0;
}

input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button,
input::-webkit-contacts-auto-fill-button,
input::-webkit-credit-card-auto-fill-button,
input::-webkit-caps-lock-indicator {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

input:-moz-autofill,
input:-moz-autofill-preview {
    filter: none;
}

/* ============ ИКОНКА-СТАТУС ============ */
.input-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 700;
    pointer-events: none;
    line-height: 1;
}

.input-wrapper input ~ .toggle-password ~ .input-status,
.input-wrapper input + .input-status { right: 14px; }

.input-status.success { color: var(--dk-success); }
.input-status.error   { color: var(--dk-danger); }
.input-status.loading {
    color: var(--dk-gray-400);
    display: inline-block;
    animation: dkSpin 1s linear infinite;
}

@keyframes dkSpin { to { transform: translateY(-50%) rotate(360deg); } }

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--dk-gray-400);
    margin-top: 0.32rem;
    line-height: 1.4;
}

.error-message {
    color: var(--dk-danger);
    font-size: 0.78rem;
    margin-top: 0.32rem;
    min-height: 0;
    line-height: 1.35;
    font-weight: 500;
}

.error-message:not(:empty) { animation: dkShake 0.3s ease; }

@keyframes dkShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

.error-message.center {
    text-align: center;
    margin: 0.7rem 0;
}

/* ============ ЧЕКБОКСЫ ============ */
.dk-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 1.3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dk-gray-600);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    min-width: 17px;
    border: 1.5px solid var(--dk-gray-300);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.18s;
    background: #fff;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover { border-color: var(--dk-primary); }

.checkbox-label input[type="checkbox"]:checked {
    background: var(--dk-primary);
    border-color: var(--dk-primary);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-terms {
    align-items: flex-start;
    margin: 0.3rem 0;
}

.checkbox-terms input { margin-top: 2px; }

/* ============ СИЛА ПАРОЛЯ ============ */
.password-strength {
    margin-top: 0.5rem;
    display: none;
}

.password-strength.visible {
    display: block;
    animation: dkFormIn 0.25s ease-out;
}

.strength-bar {
    height: 4px;
    background: var(--dk-gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.35s, background 0.35s;
}

.strength-text {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--dk-gray-400);
    transition: color 0.25s;
}

.strength-weak   .strength-bar span { width: 25%;  background: var(--dk-danger); }
.strength-fair   .strength-bar span { width: 50%;  background: var(--dk-warning); }
.strength-good   .strength-bar span { width: 75%;  background: var(--dk-success); }
.strength-strong .strength-bar span { width: 100%; background: var(--dk-gradient); }

.strength-weak   .strength-text { color: var(--dk-danger); }
.strength-fair   .strength-text { color: #d97706; }
.strength-good   .strength-text { color: #059669; }
.strength-strong .strength-text { color: var(--dk-primary); }

/* ============ КНОПКИ ============ */
.submit-btn {
    position: relative;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--dk-gradient);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--dk-shadow-btn);
    transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    line-height: 1;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -8px rgba(67, 97, 238, 0.55);
    filter: brightness(1.05);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.submit-btn.loading .btn-text { visibility: hidden; }

.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dkSpin2 0.7s linear infinite;
    position: absolute;
}

.submit-btn.loading .btn-loader { display: block; }

@keyframes dkSpin2 { to { transform: rotate(360deg); } }

.link-btn {
    background: none;
    border: none;
    color: var(--dk-primary);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.2rem 0;
    transition: color 0.18s;
}

.link-btn:hover:not(:disabled) {
    color: var(--dk-primary-dark);
    text-decoration: underline;
}

.link-btn:disabled { color: var(--dk-gray-400); cursor: not-allowed; text-decoration: none; }

.link-primary {
    color: var(--dk-primary);
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.18s;
}

.link-primary:hover {
    color: var(--dk-primary-dark);
    text-decoration: underline;
}

.dk-form-footer {
    text-align: center;
    color: var(--dk-gray-500);
    font-size: 0.85rem;
    margin-top: 1.3rem;
}

/* ============ МОДАЛКИ ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
    animation: dkOverlayIn 0.2s ease-out;
}

@keyframes dkOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.8rem 1.6rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3);
    animation: dkModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--dk-gradient);
    border-radius: 20px 20px 0 0;
}

@keyframes dkModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dk-gray-100);
    border: none;
    border-radius: 9px;
    color: var(--dk-gray-500);
    transition: background 0.18s, color 0.18s;
    padding: 0;
}

.modal-close:hover {
    background: #fee2e2;
    color: var(--dk-danger);
}

.modal-icon-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.12), rgba(114, 9, 183, 0.12));
    border-radius: 20px;
    position: relative;
}

.modal-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(67, 97, 238, 0.15);
}

.modal-icon {
    width: 34px;
    height: 34px;
    color: var(--dk-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.modal-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dk-gray-900);
    letter-spacing: -0.015em;
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: var(--dk-gray-500);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.modal-desc strong {
    color: var(--dk-primary);
    font-weight: 700;
    word-break: break-all;
}

.modal-note {
    font-size: 0.76rem;
    color: var(--dk-gray-400);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.modal-note code {
    background: var(--dk-gray-100);
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    font-size: 0.74rem;
    color: var(--dk-primary);
    font-family: 'Fira Code', 'Monaco', monospace;
}

/* ============ ОКОШКИ КОДА ============ */
.code-inputs {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    margin: 1.4rem 0 0.9rem;
    direction: ltr;
}

.code-inputs input {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dk-gray-900);
    border: 1.5px solid var(--dk-gray-200);
    border-radius: 12px;
    background: #fff;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    padding: 0;
    outline: none;
}

.code-inputs input:hover:not(:focus) { border-color: var(--dk-gray-300); }

.code-inputs input:focus {
    border-color: var(--dk-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.13);
}

.code-inputs input.filled {
    border-color: var(--dk-primary);
    background: rgba(67, 97, 238, 0.06);
    color: var(--dk-primary);
}

.code-inputs input.error {
    border-color: var(--dk-danger);
    background: #fff5f7;
    animation: dkShake 0.4s ease;
}

/* ============ ПОВТОРНАЯ ОТПРАВКА ============ */
.resend-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
    font-size: 0.82rem;
    color: var(--dk-gray-500);
}

.resend-timer {
    color: var(--dk-gray-400);
    font-weight: 600;
    font-size: 0.82rem;
}

/* ============ ШАГИ FORGOT ============ */
.forgot-step { display: none; }

.forgot-step.active {
    display: block;
    animation: dkFormIn 0.28s ease-out;
}

.forgot-step .form-group {
    text-align: left;
    margin-top: 1rem;
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none;
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 0.8rem 1rem 0.8rem 1.1rem;
    min-width: 250px;
    max-width: 360px;
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--dk-gray-200);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.86rem;
    color: var(--dk-gray-900);
    font-weight: 500;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: dkToastIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.success::before { background: var(--dk-success); }
.toast.error::before   { background: var(--dk-danger); }
.toast.warning::before { background: var(--dk-warning); }
.toast.info::before    { background: var(--dk-gradient); }

@keyframes dkToastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast.hide { animation: dkToastOut 0.28s ease-out forwards; }

@keyframes dkToastOut {
    to { opacity: 0; transform: translateX(30px); }
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast.success .toast-icon { color: var(--dk-success); }
.toast.error   .toast-icon { color: var(--dk-danger); }
.toast.warning .toast-icon { color: var(--dk-warning); }
.toast.info    .toast-icon { color: var(--dk-primary); }

/* =====================================================================
   ПОДВАЛ
   ===================================================================== */
.dk-footer {
    background: var(--dk-gray-900);
    color: #adb5bd;
    margin-top: auto;
    position: relative;
}

.dk-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--dk-gradient);
}

.dk-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
}

.dk-footer-line {
    margin: 0;
    font-size: 0.85rem;
    color: #adb5bd;
}

.dk-footer-rva {
    color: #adb5bd;
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 1px;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dk-footer-rva:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.55);
}

/* ============ АДАПТИВ ============ */
@media (max-width: 640px) {
    .dk-back-btn {
        top: 0.9rem;
        right: 0.9rem;
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    .dk-auth-main {
        padding: 4.5rem 0.9rem 2rem;
    }

    .dk-auth-card {
        padding: 2rem 1.4rem 1.6rem;
        border-radius: 16px;
    }

    .dk-auth-brand-title { font-size: 1.3rem; }

    .modal-box {
        padding: 1.7rem 1.2rem 1.3rem;
        border-radius: 16px;
    }

    .code-inputs { gap: 0.3rem; }
    .code-inputs input {
        width: 42px;
        height: 50px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .toast-container {
        top: 0.8rem;
        right: 0.6rem;
        left: 0.6rem;
    }
    .toast { min-width: auto; max-width: 100%; }

    .dk-footer-inner {
        padding: 1.2rem 1rem;
    }
}

@media (max-width: 380px) {
    .code-inputs input {
        width: 36px;
        height: 44px;
        font-size: 1.05rem;
    }

    .dk-auth-card { padding: 1.6rem 1rem 1.3rem; }
}

/* ============ СКРОЛЛБАР МОДАЛКИ ============ */
.modal-box::-webkit-scrollbar { width: 6px; }
.modal-box::-webkit-scrollbar-track { background: transparent; }
.modal-box::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 3px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.3);
}

/* =====================================================================
   ФИКС: ГАРАНТИРОВАННАЯ ВИДИМОСТЬ ТЕКСТА В ПОЛЯХ
   ===================================================================== */

/* Явно задаём цвет текста для всех полей */
.dk-auth-page input,
.dk-auth-page input[type="text"],
.dk-auth-page input[type="email"],
.dk-auth-page input[type="password"],
.dk-auth-page input[type="tel"] {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    caret-color: #4361ee !important;
    opacity: 1 !important;
    background-clip: padding-box;
}

/* Placeholder — серый, но видимый */
.dk-auth-page input::placeholder {
    color: #b4b9c4 !important;
    -webkit-text-fill-color: #b4b9c4 !important;
    opacity: 1 !important;
}

/* Фокус — текст тёмный */
.dk-auth-page input:focus {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Текст в окошках для кода */
.dk-auth-page .code-inputs input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    caret-color: #4361ee !important;
}

.dk-auth-page .code-inputs input.filled {
    color: #4361ee !important;
    -webkit-text-fill-color: #4361ee !important;
}

/* Автозаполнение Chrome / Safari / Edge — тёмный текст на белом */
.dk-auth-page input:-webkit-autofill,
.dk-auth-page input:-webkit-autofill:hover,
.dk-auth-page input:-webkit-autofill:focus,
.dk-auth-page input:-webkit-autofill:active {
    -webkit-text-fill-color: #111827 !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: #4361ee !important;
    border-color: var(--dk-gray-200) !important;
}

/* Firefox autofill */
.dk-auth-page input:autofill,
.dk-auth-page input:-moz-autofill,
.dk-auth-page input:-moz-autofill-preview {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    filter: none !important;
}

/* Текст в textarea (на будущее) */
.dk-auth-page textarea {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Тоггл пароля — принудительные цвета SVG */
.dk-auth-page .toggle-password svg {
    color: var(--dk-gray-400);
    stroke: currentColor;
}

.dk-auth-page .toggle-password.revealed svg {
    color: var(--dk-primary);
}