/* Profile Page Specific Bundle */

/* Apply background directly to body for 100% coverage and fixed attachment */
body.profile-page,
body.recharge-page {
    background:
        linear-gradient(135deg, rgba(26, 35, 50, 0.92) 0%, rgba(36, 52, 71, 0.95) 100%),
        url('../pics/1.jpg') !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
}

/* Adjust Profile Section to be transparent where needed */
.profile-section {
    position: relative;
    background: transparent;
    padding-top: var(--spacing-xl);
}

.profile-sidebar,
.profile-main {
    position: relative;
    z-index: 2;
}

/* Update cards to be semi-transparent/glassmorphic to blend with background */
.profile-sidebar.user-card {
    background: white !important;
    border: 1px solid #e0e6ed;
    padding: var(--spacing-xl) !important;
    border-radius: var(--radius-lg) !important;
    text-align: center !important;
    box-shadow: var(--shadow-lg) !important;
}

/* profile-nav داخل profile-sidebar.user-card يجب أن يكون منفصل */
.profile-sidebar.user-card > .profile-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: var(--spacing-lg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.user-card,
.profile-nav,
.certificate-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-tab {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-xl);
    /* Added padding */
    border-radius: 16px;
    /* Added border-radius */
}

/* Active Nav Item */
.profile-nav-item.active {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-blue);
    border-right-color: var(--primary-blue);
}

/* WebAuthn - تسجيل الدخول بالبصمة */
.webauthn-section .security-desc {
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.webauthn-box {
    padding: 1rem 0;
}

.webauthn-box .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue, #4a90e2);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.webauthn-box .btn:hover {
    background: #3a7bc8;
}

.webauthn-box .btn-outline-danger {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.webauthn-box .btn-outline-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

.webauthn-hint {
    color: #8b95a5;
    font-size: 0.9rem;
    margin-top: 12px;
}

.webauthn-unsupported {
    background: #f5f7fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 16px;
    color: #2c3e50;
}

.webauthn-unsupported p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* جدول البصمة المسجلة */
.webauthn-table-wrap {
    margin-bottom: 1.25rem;
}

.webauthn-table-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.webauthn-table-title i {
    color: var(--primary-blue, #4a90e2);
}

.webauthn-table-responsive {
    overflow-x: auto;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
}

.webauthn-credential-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.webauthn-credential-table thead {
    background: #f5f7fa;
    color: #2c3e50;
}

.webauthn-credential-table th {
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 1px solid #e0e6ed;
}

.webauthn-credential-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e6ed;
    color: #2c3e50;
}

.webauthn-credential-table tbody tr:last-child td {
    border-bottom: none;
}

.webauthn-credential-table .webauthn-cred-id {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.webauthn-credential-table .webauthn-empty-cell {
    text-align: center;
    color: #8b95a5;
    font-style: italic;
}

.btn-webauthn-delete-row {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-webauthn-delete-row:hover {
    background: rgba(220, 53, 69, 0.1);
}

.webauthn-no-credential-msg {
    color: #8b95a5;
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
}

@media (max-width: 768px) {
    .webauthn-credential-table {
        font-size: 0.85rem;
    }
    .webauthn-credential-table th,
    .webauthn-credential-table td {
        padding: 8px 10px;
    }
}