/* ============================================
   RIDOPAY — Security Page Styles
   ============================================ */

/* === Security & Profile Page Container === */
#securityPage,
#profilePage {
    padding: 0 20px;
}

/* === Toggle Switch === */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(90, 88, 79, 0.3);
    border-radius: 26px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #5a584f;
    border-radius: 50%;
    transition: transform 0.25s ease, background 0.25s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(201, 168, 76, 0.25);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--gold, #c9a84c);
}

/* === Profile Page === */
.profile-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.1);
    border: 2px solid rgba(201, 168, 76, 0.3);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold, #c9a84c);
    font-family: var(--font-display, 'Playfair Display', serif);
    flex-shrink: 0;
}

.profile-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f0eee6);
}

.profile-email {
    font-size: 12px;
    color: var(--text-muted, #5a584f);
}

/* === Security Header === */
.security-header {
    padding: 16px 0 8px;
}

.security-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold, #c9a84c);
    margin-bottom: 4px;
}

.security-subtitle {
    font-size: 13px;
    color: var(--text-muted, #5a584f);
}

/* === PIN Status Card === */
.security-card {
    background: var(--bg-card, #13131a);
    border: 1px solid var(--border-card, rgba(201, 168, 76, 0.12));
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.sec-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sec-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
}

.sec-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sec-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f0eee6);
}

.sec-card-status {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.sec-card-status.active {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.sec-card-status.inactive {
    color: var(--text-muted, #5a584f);
    background: rgba(90, 88, 79, 0.15);
}

/* === Security Options === */
.security-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-card, #13131a);
    border: 1px solid var(--border-card, rgba(201, 168, 76, 0.12));
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.security-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(201, 168, 76, 0.06);
    cursor: pointer;
    text-align: left;
    font-family: var(--font-main, 'Outfit', sans-serif);
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.security-option-btn:last-child {
    border-bottom: none;
}

.security-option-btn:active {
    background: rgba(201, 168, 76, 0.04);
}

.security-option-btn.danger:active {
    background: rgba(231, 76, 60, 0.04);
}

.sec-opt-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sec-opt-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.06);
    border-radius: 10px;
    flex-shrink: 0;
}

.sec-opt-icon.danger {
    background: rgba(231, 76, 60, 0.06);
}

.sec-opt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sec-opt-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #f0eee6);
}

.sec-opt-desc {
    font-size: 11px;
    color: var(--text-muted, #5a584f);
}

.sec-opt-arrow {
    flex-shrink: 0;
    opacity: 0.5;
}

/* === Info Row === */
.security-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(201, 168, 76, 0.03);
    border: 1px solid rgba(201, 168, 76, 0.08);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-muted, #5a584f);
    line-height: 1.5;
}

.security-info svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* === Verify Modal === */
.sec-verify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sec-verify-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sec-verify-modal {
    width: 100%;
    max-width: 340px;
    background: #13131a;
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 20px;
    padding: 28px 24px 24px;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.sec-verify-overlay.show .sec-verify-modal {
    transform: scale(1) translateY(0);
}

.sec-verify-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold, #c9a84c), transparent);
    opacity: 0.5;
}

.sec-verify-title {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #f0eee6);
    text-align: center;
    margin-bottom: 6px;
}

.sec-verify-desc {
    font-size: 12px;
    color: var(--text-secondary, #9a978e);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
}

.sec-verify-email {
    color: var(--gold, #c9a84c);
    font-weight: 600;
}

/* OTP Inputs in verify modal */
.sec-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sec-otp-box {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-main, 'Outfit', sans-serif);
    color: var(--gold, #c9a84c);
    background: #0a0a0c;
    border: 1.5px solid var(--border-card, rgba(201, 168, 76, 0.12));
    border-radius: 10px;
    outline: none;
    caret-color: var(--gold, #c9a84c);
    transition: border-color 0.15s ease;
}

.sec-otp-box:focus {
    border-color: var(--gold, #c9a84c);
}

.sec-otp-box.filled {
    border-color: rgba(201, 168, 76, 0.4);
}

.sec-verify-error {
    font-size: 12px;
    color: var(--red, #e74c3c);
    text-align: center;
    min-height: 18px;
    margin-bottom: 12px;
}

.sec-verify-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sec-verify-btn {
    width: 100%;
    height: 46px;
    background: var(--gold, #c9a84c);
    color: #0a0a0c;
    border: none;
    border-radius: 12px;
    font-family: var(--font-main, 'Outfit', sans-serif);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.sec-verify-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sec-verify-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.sec-verify-cancel {
    width: 100%;
    height: 40px;
    background: transparent;
    color: var(--text-muted, #5a584f);
    border: 1px solid var(--border-card, rgba(201, 168, 76, 0.12));
    border-radius: 12px;
    font-family: var(--font-main, 'Outfit', sans-serif);
    font-size: 13px;
    cursor: pointer;
}

.sec-verify-resend {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted, #5a584f);
    margin-top: 4px;
}

.sec-verify-resend button {
    background: none;
    border: none;
    color: var(--gold, #c9a84c);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main, 'Outfit', sans-serif);
}

.sec-verify-resend button:disabled {
    color: var(--text-muted, #5a584f);
    cursor: not-allowed;
}

/* === Attempts Change Modal === */
.sec-attempts-card {
    background: #0a0a0c;
    border: 1px solid var(--border-card, rgba(201, 168, 76, 0.12));
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.sec-attempts-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--gold, #c9a84c);
    font-family: var(--font-main, 'Outfit', sans-serif);
}

.sec-attempts-label {
    font-size: 12px;
    color: var(--text-muted, #5a584f);
    margin-top: 4px;
}

.sec-attempts-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.sec-attempts-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 10px;
    cursor: pointer;
    color: var(--gold, #c9a84c);
}

.sec-attempts-btn:active {
    background: rgba(201, 168, 76, 0.15);
    transform: scale(0.92);
}
