/* =========================================================================
   auth-triada.css — стили модалок аутентификации (триада + пароль)
   Префикс: .triada-*
   ========================================================================= */

/* ─── Базовый оверлей модалки (совместим с .custom-modal из base.html) ─── */
.custom-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 16px;
    box-sizing: border-box;
}
.custom-modal.show { opacity: 1; }

.custom-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
    box-sizing: border-box;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.custom-modal.show .custom-modal-content {
    transform: translateY(0) scale(1);
}

/* ─── Размеры ─── */
.triada-modal-sm { width: 100%; max-width: 360px; }
.triada-modal-md { width: 100%; max-width: 440px; }
.triada-modal--center { text-align: center; }

@media (max-width: 480px) {
    .custom-modal-content { padding: 22px 18px; border-radius: 16px; }
}

/* ─── Крестик закрытия ─── */
.custom-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    background: transparent;
    border: none;
    font-family: inherit;
}
.custom-close:hover { background: #f3f4f6; color: #374151; }

/* ─── Заголовок модалки ─── */
.triada-header { text-align: center; margin-bottom: 22px; }

.triada-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    position: relative;
}
.triada-header-icon--primary {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
}
.triada-header-icon--success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #10b981;
}

.triada-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}
.triada-title--center { text-align: center; }

.triada-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 8px 0 0;
    line-height: 1.5;
}
.triada-subtitle--center { text-align: center; }

/* ─── Поля ввода ─── */
.triada-field { margin-bottom: 16px; text-align: left; }

.triada-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.triada-input-wrap { position: relative; }

.triada-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}

.triada-input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}
.triada-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.triada-input::placeholder { color: #9ca3af; }
.triada-input:disabled { background: #f9fafb; opacity: 0.7; cursor: not-allowed; }

.triada-input-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.triada-input-toggle:hover { background: #f3f4f6; color: #4b5563; }

/* OTP-инпут */
.triada-otp-row { margin-bottom: 20px; }
.triada-input-otp {
    text-align: center;
    font-size: 26px;
    letter-spacing: 10px;
    font-weight: 600;
    padding-left: 20px;
    padding-right: 4px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}

/* ─── Хинты / ошибки ─── */
.triada-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 6px 0 0;
    line-height: 1.4;
    min-height: 0;
}
.triada-hint:empty { display: none; }
.triada-hint--center { text-align: center; }
.triada-hint--mt { margin-top: 14px; }
.triada-hint[data-error-for]:not(:empty) { color: #dc2626; }

/* ─── Кнопки ─── */
.triada-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1.3;
    text-align: left;
}
.triada-btn:active:not(:disabled) { transform: scale(0.985); }
.triada-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.triada-btn-lg { padding: 15px 20px; font-size: 16px; border-radius: 13px; }

.triada-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.triada-btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.42);
    transform: translateY(-1px);
}

.triada-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}
.triada-btn-secondary:hover:not(:disabled) { background: #e5e7eb; }

.triada-btn-ghost {
    background: transparent;
    color: #4f46e5;
    font-weight: 600;
    margin-top: 10px;
}
.triada-btn-ghost:hover:not(:disabled) { background: #f5f3ff; }

.triada-btn-passkey {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
    padding: 14px 18px;
    margin-bottom: 10px;
}
.triada-btn-passkey:hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.42);
    transform: translateY(-1px);
}
.triada-btn-passkey > i:first-child { font-size: 20px; }

.triada-btn-face {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
    padding: 14px 18px;
}
.triada-btn-face:hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.42);
    transform: translateY(-1px);
}
.triada-btn-face > i:first-child { font-size: 20px; }

.triada-btn-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.triada-btn-label strong { font-size: 15px; font-weight: 600; }
.triada-btn-label small { font-size: 12px; opacity: 0.85; font-weight: 400; }

/* ─── Биометрические кнопки ─── */
.triada-bio-group { margin-bottom: 16px; }

/* ─── Разделители ─── */
.triada-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 12px;
    margin: 14px 0;
}
.triada-divider::before,
.triada-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.triada-divider-text {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 18px 0 6px;
}

/* ─── Ссылки ─── */
.triada-links-row {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}
.triada-link {
    color: #4f46e5;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: inherit;
}
.triada-link:hover { background: #f5f3ff; }
.triada-link--muted { color: #6b7280; }
.triada-link--muted:hover { color: #4b5563; background: #f3f4f6; }

/* ─── Список выбора биометрии ─── */
.triada-bio-choice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.triada-bio-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.triada-bio-choice:hover {
    border-color: #4f46e5;
    background: #fafaff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.08);
}

.triada-bio-choice-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.triada-bio-choice-icon--passkey {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
}
.triada-bio-choice-icon--face {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.triada-bio-choice-text { flex: 1; min-width: 0; }
.triada-bio-choice-title {
    font-weight: 600;
    color: #111827;
    font-size: 15px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.triada-bio-choice-desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.4;
}
.triada-bio-choice-arrow { color: #9ca3af; font-size: 14px; }

/* ─── Бейджи ─── */
.triada-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1;
}
.triada-badge--secure { background: #d1fae5; color: #065f46; }

/* ─── Callouts (инфо-блоки) ─── */
.triada-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: left;
}
.triada-callout > i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}
.triada-callout--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}
.triada-callout--info > i { color: #3b82f6; }

.triada-callout--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}
.triada-callout--warning > i { color: #f59e0b; }

/* ─── Hero-иконка с пульсацией ─── */
.triada-hero-icon {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    margin: 8px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
}
.triada-hero-icon--passkey {
    background: linear-gradient(135deg, #eef2ff, #c7d2fe);
    color: #4f46e5;
}
.triada-hero-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 30px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.25), transparent 70%);
    animation: triada-pulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes triada-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 0.9; transform: scale(1.08); }
}

/* ─── Список фич ─── */
.triada-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 22px;
    text-align: left;
}
.triada-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #374151;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 10px;
}
.triada-feature > i {
    color: #4f46e5;
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* ─── Круглая камера (face/gesture) ─── */
.triada-camera-circle {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 18px auto;
    border-radius: 50%;
    overflow: hidden;
    background: #0f172a;
    border: 3px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.triada-camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.triada-camera-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 40px rgba(79, 70, 229, 0.4);
    pointer-events: none;
}
.triada-camera-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #a5b4fc, transparent);
    animation: triada-scan 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes triada-scan {
    0%   { top: 10%; opacity: 0.4; }
    50%  { top: 88%; opacity: 1; }
    100% { top: 10%; opacity: 0.4; }
}

/* ─── Прогресс ─── */
.triada-progress { margin: 16px 0 20px; }
.triada-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.triada-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 3px;
    transition: width 0.2s linear;
}
.triada-progress-status {
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0 0;
    text-align: center;
}

/* ─── Gesture target ─── */
.triada-gesture-target-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0 6px;
}
.triada-gesture-target {
    font-size: 60px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.3));
    animation: triada-bounce 1.4s ease-in-out infinite;
}
@keyframes triada-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.triada-gesture-name {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    font-style: italic;
}

/* ─── Успех-анимация ─── */
.triada-success-anim {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 16px auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.triada-success-rings span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #10b981;
    opacity: 0;
    animation: triada-ring 2.4s ease-out infinite;
}
.triada-success-rings span:nth-child(2) { animation-delay: 0.8s; }
.triada-success-rings span:nth-child(3) { animation-delay: 1.6s; }
@keyframes triada-ring {
    0%   { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}
.triada-success-icon {
    font-size: 56px;
    color: #10b981;
    z-index: 1;
}
.triada-success-anim--check .triada-success-icon {
    animation: triada-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes triada-pop {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
}

/* ─── Полноэкранный overlay (Face Unlock) ─── */
.triada-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: triada-fade 0.35s ease;
}
@keyframes triada-fade { from { opacity: 0; } to { opacity: 1; } }

.triada-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: #fff;
    padding: 24px;
}

.triada-overlay-orb {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.35), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.triada-overlay-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: scaleX(-1);
}
.triada-overlay-orb-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(165, 180, 252, 0.55);
    animation: triada-orb-ring 2.4s ease-out infinite;
    pointer-events: none;
}
.triada-overlay-orb-ring--2 { animation-delay: 1.2s; }
@keyframes triada-orb-ring {
    0%   { transform: scale(0.85); opacity: 0.9; }
    100% { transform: scale(1.25); opacity: 0; }
}
.triada-overlay-placeholder {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

.triada-overlay-status {
    font-size: 16px;
    color: #e5e7eb;
    margin: 0;
    text-align: center;
}

.triada-overlay-dots {
    display: flex;
    gap: 8px;
}
.triada-overlay-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    animation: triada-dot 1.4s ease-in-out infinite;
}
.triada-overlay-dots span:nth-child(2) { animation-delay: 0.2s; }
.triada-overlay-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes triada-dot {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50%      { transform: scale(1.5); opacity: 1; }
}

.triada-overlay-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 24px;
    border-radius: 22px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s;
}
.triada-overlay-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ─── Список passkey для управления ─── */
.triada-passkey-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.triada-passkey-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.triada-passkey-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.triada-passkey-item-text { flex: 1; min-width: 0; }
.triada-passkey-item-title {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 2px;
}
.triada-passkey-item-date {
    font-size: 12px;
    color: #6b7280;
}
.triada-passkey-item-revoke {
    background: transparent;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.triada-passkey-item-revoke:hover { background: #fef2f2; }

.triada-skeleton-row {
    height: 68px;
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: triada-skeleton 1.4s ease-in-out infinite;
}
@keyframes triada-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Утилитарное ─── */
.hidden { display: none !important; }


/* ─── Индикатор силы пароля ─── */
.triada-pw-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    min-height: 16px;
}
.triada-pw-strength-bar {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.triada-pw-strength-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: transparent;
    border-radius: 2px;
    transition: width 0.25s ease, background 0.25s ease;
}
.triada-pw-strength-label {
    font-size: 11.5px;
    font-weight: 500;
    min-width: 60px;
    text-align: right;
    transition: color 0.2s;
}
.triada-pw-strength-label:empty { display: none; }


/* ─── Мобильная адаптация ─── */
@media (max-width: 480px) {
    .triada-title { font-size: 19px; }
    .triada-subtitle { font-size: 13.5px; }
    .triada-btn { font-size: 14.5px; padding: 12px 16px; }
    .triada-btn-lg { padding: 14px 18px; }
    .triada-camera-circle { width: 200px; height: 200px; }
    .triada-overlay-orb { width: 180px; height: 180px; }
    .triada-overlay-placeholder { font-size: 100px; }
    .triada-bio-choice { padding: 12px; gap: 10px; }
    .triada-bio-choice-icon { width: 42px; height: 42px; font-size: 18px; }
    .triada-bio-choice-desc { font-size: 12px; }
    .triada-input-otp { font-size: 22px; letter-spacing: 6px; }
}

/* ─── Тёмная тема (опционально, если используете dark mode) ─── */
@media (prefers-color-scheme: dark) {
    /* Раскомментируйте, если у вас тёмная тема */
    /*
    .custom-modal-content { background: #1f2937; color: #f9fafb; }
    .triada-title { color: #f9fafb; }
    .triada-subtitle { color: #9ca3af; }
    .triada-input { background: #111827; color: #f9fafb; border-color: #374151; }
    .triada-bio-choice { background: #111827; border-color: #374151; }
    */
}

/* Кнопки-ссылки на триаду в модалках */
#triadaSetupFromLogin,
#triadaSetupFromRegisterSuccess,
#learnPasskeyFromRegister {
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background .2s, color .2s;
}

#triadaSetupFromLogin:hover,
#learnPasskeyFromRegister:hover {
    color: var(--triada-primary, #4f46e5);
    background: rgba(79, 70, 229, 0.08);
}

#triadaSetupFromRegisterSuccess {
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   SECURITY MODAL — карточки методов
   ═══════════════════════════════════════════════════════════════ */

.triada-security-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.triada-security-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    transition: all .2s;
}
.triada-security-row.is-enabled {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.triada-security-row.is-disabled {
    opacity: .6;
}

.triada-security-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.triada-security-icon--passkey {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
}
.triada-security-icon--face {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}
.triada-security-icon--gesture {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}
.triada-security-icon--totp {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.triada-security-info {
    flex: 1;
    min-width: 0;
}

.triada-security-title {
    font-weight: 600;
    font-size: 14.5px;
    color: #111827;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.triada-security-desc {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.4;
}

.triada-security-btn {
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}
.triada-security-btn:hover:not(:disabled) {
    border-color: #4f46e5;
    color: #4f46e5;
}
.triada-security-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.triada-security-btn--on {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}
.triada-security-btn--on:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
}

/* ─── Индикатор надёжности ─── */
.triada-strength {
    margin: 8px 0 18px;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 12px;
}
.triada-strength-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.triada-strength-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: #ef4444;
    border-radius: 3px;
    transition: width .35s ease, background .35s ease;
}
.triada-strength-label {
    font-size: 12.5px;
    color: #6b7280;
    text-align: right;
}
.triada-strength-label strong {
    font-weight: 600;
    margin-left: 4px;
    transition: color .35s ease;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .triada-security-row { padding: 12px; gap: 10px; }
    .triada-security-icon { width: 38px; height: 38px; font-size: 16px; }
    .triada-security-title { font-size: 13.5px; }
    .triada-security-desc { font-size: 12px; }
    .triada-security-btn { padding: 6px 10px; font-size: 12px; }
}