/* ============================================================
   PAGE: FAMILY DASHBOARD (SPA)
   ============================================================ */

.family-dashboard-page {
    background: var(--bg-body);
}

/* ============================================================
   1. Main Layout
   ============================================================ */
.fd-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
    align-items: flex-start;
}

/* ============================================================
   2. Sidebar
   ============================================================ */
.fd-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(34, 85, 159, 0.06);
    border: 1px solid rgba(34, 85, 159, 0.04);
    padding: 20px 16px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transition: transform 0.3s ease;
}

/* Custom scrollbar */
.fd-sidebar::-webkit-scrollbar {
    width: 6px;
}
.fd-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.fd-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.fd-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================================
   3. Profile Card
   ============================================================ */
.sidebar-profile {
    text-align: center;
    padding: 16px 8px 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a437c 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(34, 85, 159, 0.25);
    border: 3px solid white;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.profile-name {
    font-size: 1rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    max-width: 100%;
}

.profile-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    margin: 0;
    letter-spacing: 1px;
    direction: ltr;
    font-weight: 700;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    background: #F3F4F6;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-status.status-active {
    background: #E8F5EE;
    color: #166534;
}

.profile-status.status-expired {
    background: #FEE2E2;
    color: #991B1B;
}

.profile-status.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.profile-status.status-suspended {
    background: #FEE2E2;
    color: #991B1B;
}

.profile-status.status-deleted {
    background: #F3F4F6;
    color: #6B7280;
}

.profile-status.status-disabled {
    background: #FEF3C7;
    color: #92400E;
}

/* ============================================================
   4. Nav Menu
   ============================================================ */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid transparent;
}

.nav-item i {
    font-size: 1.1rem;
    color: var(--text-secondary);
    width: 22px;
    text-align: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.nav-item span {
    flex: 1;
}

.nav-item:hover {
    background: var(--bg-body);
    color: var(--primary-color);
}

.nav-item:hover i {
    color: var(--primary-color);
}

/* Active tab */
.nav-item.active {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: var(--primary-color);
    border-color: rgba(34, 85, 159, 0.15);
    box-shadow: 0 2px 8px rgba(34, 85, 159, 0.08);
}

.nav-item.active i {
    color: var(--primary-color);
}

/* Disabled tab */
.nav-item-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.nav-item-disabled:hover {
    background: transparent;
    color: var(--text-primary);
}

.nav-item-disabled:hover i {
    color: var(--text-secondary);
}

.nav-badge {
    background: var(--warning-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ============================================================
   5. Sidebar Footer (Logout)
   ============================================================ */
.sidebar-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 46px;
}

.logout-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.25);
}

.logout-btn i {
    font-size: 1rem;
}

/* ============================================================
   6. Content Area
   ============================================================ */
.fd-content {
    padding: 0 0 0 20px;
    min-width: 0;
}

/* Mobile Tab Header */
.mobile-tab-header {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.mobile-sidebar-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-sidebar-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-body);
}

.mobile-current-tab {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    flex: 1;
}

/* Content Wrapper */
.content-wrapper {
    animation: fadeIn 0.3s ease;
}

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

/* ============================================================
   7. Tabs (Content)
   ============================================================ */
.fd-tab {
    animation: tabFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================================
   8. Placeholder (Coming Soon / Loading)
   ============================================================ */
.tab-placeholder {
    background: white;
    border-radius: var(--radius-lg);
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(34, 85, 159, 0.06);
    border: 1px solid rgba(34, 85, 159, 0.04);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.tab-placeholder > i {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    margin-bottom: 8px;
}

.tab-placeholder h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
}

.tab-placeholder p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* Disabled placeholder */
.tab-placeholder-disabled > i {
    color: var(--warning-color);
    opacity: 0.5;
}

.tab-placeholder-disabled h2 {
    color: var(--warning-color);
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FEF3C7;
    color: #92400E;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-top: 10px;
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.coming-soon-badge i {
    font-size: 0.95rem;
}

/* ============================================================
   9. Sidebar Overlay (Mobile)
   ============================================================ */
.fd-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fd-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   10. Global Loader
   ============================================================ */
.fd-global-loader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-global-loader-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: loaderPop 0.3s ease;
}

@keyframes loaderPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fd-global-loader-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: block;
}

.fd-global-loader-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 700;
}

/* ============================================================
   11. Responsive - Tablet
   ============================================================ */
@media (max-width: 1024px) {
    .fd-layout {
        grid-template-columns: 240px 1fr;
        padding: 16px;
    }

    .fd-content {
        padding: 0 0 0 16px;
    }

    .profile-avatar {
        width: 68px;
        height: 68px;
        font-size: 1.7rem;
    }

    .nav-item {
        padding: 10px 12px;
        font-size: 0.88rem;
    }
}

/* ============================================================
   12. Responsive - Mobile
   ============================================================ */
@media (max-width: 768px) {
    .fd-layout {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 0;
    }

    /* Show mobile tab header */
    .mobile-tab-header {
        display: flex;
    }

    /* Sidebar becomes Drawer */
    .fd-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 290px;
        max-width: 85vw;
        max-height: 100vh;
        border-radius: 0;
        transform: translateX(100%);
        z-index: 999;
        padding: 70px 16px 20px;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    }

    .fd-sidebar.open {
        transform: translateX(0);
    }

    /* Content full width */
    .fd-content {
        padding: 0;
    }

    /* Profile in drawer */
    .sidebar-profile {
        padding: 12px 8px 16px;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
    }

    .profile-name {
        font-size: 0.95rem;
    }

    /* Placeholder smaller */
    .tab-placeholder {
        padding: 40px 20px;
        min-height: 320px;
        border-radius: var(--radius-md);
    }

    .tab-placeholder > i {
        font-size: 3rem;
    }

    .tab-placeholder h2 {
        font-size: 1.2rem;
    }

    .tab-placeholder p {
        font-size: 0.88rem;
    }
}

/* ============================================================
   13. Responsive - Small Mobile
   ============================================================ */
@media (max-width: 480px) {
    .fd-layout {
        padding: 10px;
    }

    .mobile-tab-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .mobile-sidebar-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .mobile-current-tab {
        font-size: 1rem;
    }

    .tab-placeholder {
        padding: 32px 16px;
        min-height: 280px;
    }

    .tab-placeholder > i {
        font-size: 2.5rem;
    }

    .tab-placeholder h2 {
        font-size: 1.1rem;
    }

    .tab-placeholder p {
        font-size: 0.82rem;
    }

    .coming-soon-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
}

/* ============================================================
   14. Cards
   ============================================================ */
.fd-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(34, 85, 159, 0.06);
    border: 1px solid rgba(34, 85, 159, 0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.fd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #FAFBFF 0%, #FFFFFF 100%);
}

.fd-card-header h2 {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fd-card-header h2 i {
    color: var(--secondary-color);
}

.fd-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.fd-icon-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-body);
    transform: rotate(90deg);
}

.fd-card-body {
    padding: 24px;
}

.fd-card-footer {
    padding: 20px 24px;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

.fd-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* ============================================================
   15. Field Groups
   ============================================================ */
.fd-field-group {
    margin-bottom: 18px;
}

.fd-field-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.fd-field-group label.required::after {
    content: " *";
    color: var(--danger-color);
}

.fd-field-group input,
.fd-field-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: 48px;
}

.fd-field-group input:focus,
.fd-field-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(34, 85, 159, 0.08);
}

.fd-field-group input:disabled {
    background: #F3F4F6;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.fd-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
    font-weight: 700;
}

.field-error.show {
    display: block;
    animation: shakeError 0.3s ease;
}

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

/* ============================================================
   16. Photo
   ============================================================ */
.photo-wrapper {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(34, 85, 159, 0.15);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.photo-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.88rem;
    min-height: 42px;
}

/* ============================================================
   17. Notes
   ============================================================ */
.notes-container {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--bg-body);
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notes-list:empty::before {
    content: "لا توجد ملاحظات";
    display: block;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 16px;
}

.notes-list li {
    background: white;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.notes-list li:hover {
    border-color: var(--primary-color);
}

.note-text {
    flex: 1;
    font-size: 0.9rem;
    word-break: break-word;
    line-height: 1.5;
}

.delete-note-btn {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delete-note-btn:hover {
    background: #FEE2E2;
}

.add-note-row {
    display: flex;
    gap: 10px;
}

.add-note-row input {
    flex: 1;
    min-height: 44px;
}

.add-note-row .btn {
    flex-shrink: 0;
}

/* ============================================================
   18. Checkbox
   ============================================================ */
.fd-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: white;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.fd-checkbox-group:has(input:checked) {
    background: #EFF6FF;
    border-color: rgba(34, 85, 159, 0.2);
}

.fd-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.fd-checkbox-group label {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
}

/* ============================================================
   19. Messages
   ============================================================ */
.fd-message {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-top: 14px;
    font-size: 0.88rem;
    line-height: 1.6;
    font-weight: 700;
}

.fd-message.show {
    display: flex;
    animation: messageFade 0.3s ease;
}

@keyframes messageFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.fd-message.success {
    background: #E8F5EE;
    color: #166534;
    border-right: 4px solid var(--secondary-color);
}

.fd-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border-right: 4px solid var(--danger-color);
}

.fd-message.info {
    background: #EFF6FF;
    color: #1E3A8A;
    border-right: 4px solid var(--primary-color);
}

.fd-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   20. Face Verification Card
   ============================================================ */
.fd-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    background: #F3F4F6;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.fd-badge.badge-active {
    background: #E8F5EE;
    color: #166534;
}

.fd-badge.badge-inactive {
    background: #FEF3C7;
    color: #92400E;
}

.fd-section-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 18px;
    padding: 12px 16px;
    background: #EFF6FF;
    border-right: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
}

.fd-section-desc i {
    color: var(--primary-color);
    margin-left: 6px;
}

.fd-status-box {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
    border-right: 4px solid var(--primary-color);
}

.fd-status-box .status-text {
    margin: 0;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.fd-status-box .status-detail {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.fd-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   21. Camera Container
   ============================================================ */
.fd-camera-container {
    position: relative;
    margin-top: 16px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}

.fd-camera-container video {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.fd-capture-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fd-capture-btn:hover {
    transform: translateX(-50%) scale(1.08);
}

.fd-capture-btn i {
    color: var(--danger-color);
    font-size: 2.2rem;
}

.fd-close-camera-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fd-close-camera-btn:hover {
    background: var(--danger-color);
}

/* ============================================================
   22. Danger Card
   ============================================================ */
.fd-danger-card {
    border: 2px solid rgba(230, 57, 70, 0.2);
}

.fd-danger-desc {
    font-size: 0.88rem;
    color: #7F1D1D;
    line-height: 1.7;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: #FEF2F2;
    border-radius: var(--radius-sm);
    border-right: 4px solid var(--danger-color);
}

.fd-danger-desc strong {
    color: #991B1B;
    font-weight: 900;
}

/* ============================================================
   23. Password Field Wrapper
   ============================================================ */
.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    transition: all 0.2s ease;
}

.password-field-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(34, 85, 159, 0.08);
}

.password-field-wrapper input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 12px 16px !important;
    padding-left: 50px !important;
    background: transparent;
    min-height: 48px;
}

.password-field-wrapper input:focus {
    outline: none;
    box-shadow: none !important;
}

.password-field-wrapper .toggle-password {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-field-wrapper .toggle-password:hover {
    background: var(--bg-body);
    color: var(--primary-color);
}

/* ============================================================
   24. Modal
   ============================================================ */
.fd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    animation: modalFadeIn 0.25s ease;
}

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

.fd-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 26px 22px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fd-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-body);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.fd-modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.fd-modal-header {
    text-align: center;
    margin-bottom: 22px;
}

.fd-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 14px;
    animation: modalIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIconPop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fd-danger-icon {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: var(--danger-color);
    border: 4px solid var(--danger-color);
}

.fd-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--danger-color);
    margin: 0 0 6px;
}

.fd-modal-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

.fd-modal-header p strong {
    color: var(--danger-color);
    font-weight: 900;
}

/* ============================================================
   25. Modal Warnings
   ============================================================ */
.fd-warnings-box {
    background: #FEF3C7;
    border-right: 4px solid var(--warning-color);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.warnings-title {
    font-size: 0.9rem;
    font-weight: 900;
    color: #92400E;
    margin: 0 0 10px;
}

.warnings-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warnings-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #78350F;
    line-height: 1.5;
}

.warnings-list li i {
    color: var(--danger-color);
    font-size: 0.75rem;
    background: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   26. Refund Link Box
   ============================================================ */
.fd-refund-link-box {
    background: #EFF6FF;
    border-right: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
}

.fd-refund-link-box p {
    margin: 0;
    font-size: 0.85rem;
    color: #1E3A8A;
    font-weight: 700;
}

.fd-refund-link-box a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 4px;
}

.fd-refund-link-box a:hover {
    color: var(--primary-dark);
}

.fd-refund-link-box a i {
    font-size: 0.75rem;
}

/* ============================================================
   27. Danger Checkbox
   ============================================================ */
.fd-danger-checkbox {
    background: #FEF2F2;
    border-color: rgba(230, 57, 70, 0.2);
}

.fd-danger-checkbox:has(input:checked) {
    background: #FEE2E2;
    border-color: var(--danger-color);
}

.fd-danger-checkbox input[type="checkbox"] {
    accent-color: var(--danger-color);
}

/* ============================================================
   28. Modal Actions
   ============================================================ */
.fd-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.fd-modal-actions .btn {
    flex: 1;
    min-height: 50px;
}

.fd-modal-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   29. Responsive
   ============================================================ */
@media (max-width: 768px) {
    .fd-card-header {
        padding: 16px 18px;
    }

    .fd-card-header h2 {
        font-size: 1.05rem;
    }

    .fd-card-body {
        padding: 20px 18px;
    }

    .fd-card-footer {
        padding: 16px 18px;
    }

    .fd-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .photo-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .photo-info {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .fd-card {
        border-radius: var(--radius-md);
        margin-bottom: 14px;
    }

    .fd-card-header {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .fd-card-header h2 {
        font-size: 0.98rem;
        gap: 8px;
    }

    .fd-card-body {
        padding: 16px;
    }

    .fd-card-footer {
        padding: 14px 16px;
    }

    .fd-field-group input {
        font-size: 16px; /* prevent iOS zoom */
    }

    .fd-modal {
        padding: 22px 18px 18px;
        border-radius: var(--radius-md);
    }

    .fd-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .fd-modal-header h2 {
        font-size: 1.15rem;
    }

    .fd-modal-actions {
        flex-direction: column-reverse;
    }

    .fd-modal-actions .btn {
        width: 100%;
    }

    .photo-preview {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .add-note-row {
        flex-direction: column;
    }

    .add-note-row .btn {
        width: 100%;
    }
}

/* ============================================================
   30. حقول تاريخ الميلاد — للقراءة فقط
   ============================================================ */

/*
 * ملاحظة: حقل تاريخ الميلاد يستخدم type="text" مع readonly،
 * لذا لا حاجة لقواعد input[type="date"] هنا.
 * القواعد السابقة كانت تمنع فتح منتقي التاريخ في تبويب التقارير.
 */

/* الحقول للقراءة فقط */
.fd-field-group input[readonly],
.fd-field-group input:disabled {
    background-color: #F3F4F6;
    color: var(--text-primary);
    cursor: not-allowed;
    border-color: #E5E7EB;
}

.fd-field-group input[readonly]:focus,
.fd-field-group input:disabled:focus {
    border-color: #E5E7EB;
    box-shadow: none;
    outline: none;
}

/* تحسين مظهر حقول التاريخ القابلة للتعديل */
.fd-field-group input[type="date"] {
    cursor: pointer;
    color-scheme: light;
}

.fd-field-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.fd-field-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Danger Card - بدون عنوان */
.fd-danger-card {
    border: 2px solid rgba(230, 57, 70, 0.15);
    background: linear-gradient(180deg, #FFFFFF 0%, #FEF2F2 100%);
}

.fd-danger-card .fd-danger-desc {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 18px;
}

.fd-danger-card .fd-danger-desc > i {
    color: var(--danger-color);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================
   31. Notifications Tab
   ============================================================ */

/* ===== Benefits Box ===== */
.fd-benefits-box {
    background: #FEF3C7;
    border-right: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.fd-benefits-box .benefits-title {
    font-weight: 900;
    color: #92400e;
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.fd-benefits-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fd-benefits-box ul li {
    padding: 6px 0;
    color: #78350f;
    font-size: 0.88rem;
    line-height: 1.6;
}

.fd-benefits-box ul li strong {
    color: #92400e;
}

/* ===== Parents Grid ===== */
.fd-parents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.fd-parent-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.25s ease;
}

.fd-parent-card:hover {
    border-color: #0088CC;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.08);
}

.fd-parent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.fd-parent-header h3 {
    font-size: 1rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fd-parent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    background: #F3F4F6;
    color: var(--text-secondary);
}

.fd-parent-badge.linked {
    background: #E8F5EE;
    color: var(--secondary-dark);
}

.fd-parent-badge.not-linked {
    background: #FEF3C7;
    color: #92400E;
}

.fd-parent-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fd-parent-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: right;
    line-height: 1.5;
}

.fd-parent-action .btn {
    min-height: 44px;
    font-size: 0.88rem;
}

.fd-parent-action .btn-outline {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.fd-parent-action .btn-outline:hover {
    background: var(--danger-color);
    color: white;
}

/* ===== Method Box ===== */
.fd-method-box {
    background: var(--bg-body);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.fd-method-box .method-title {
    font-weight: 900;
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.fd-method-box .method-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fd-radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fd-radio-option:hover {
    border-color: #0088CC;
}

.fd-radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #0088CC;
    cursor: pointer;
    flex-shrink: 0;
}

.fd-radio-option:has(input[type="radio"]:checked) {
    border-color: #0088CC;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.1);
}

.fd-radio-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fd-radio-option span strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.fd-radio-option span small {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ===== QR Modal ===== */
.fd-telegram-icon {
    background: linear-gradient(135deg, #f0f9ff 0%, #DBEAFE 100%);
    color: #0088CC;
    border: 4px solid #0088CC;
}

.fd-telegram-icon i {
    color: #0088CC;
}

.qr-code-box {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    max-width: 280px;
}

.qr-code-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.qr-loading {
    color: var(--text-secondary);
    text-align: center;
}

.qr-loading i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
    color: #0088CC;
}

.qr-loading p {
    font-size: 0.85rem;
    margin: 0;
}

.linking-status {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f0f9ff;
    border-radius: var(--radius-md);
    border-right: 4px solid #0088CC;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .fd-parents-grid {
        grid-template-columns: 1fr;
    }

    .qr-code-box {
        min-height: 220px;
        max-width: 240px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .fd-benefits-box {
        padding: 14px 16px;
    }

    .fd-benefits-box ul li {
        font-size: 0.85rem;
    }

    .fd-parent-card {
        padding: 14px;
    }

    .fd-parent-header h3 {
        font-size: 0.92rem;
    }

    .fd-radio-option {
        padding: 10px 14px;
    }
}

/* ============================================================
   32. Reports Tab
   ============================================================ */

/* ===== Quick Filters ===== */
.fd-filter-quick {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fd-quick-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 42px;
}

.fd-quick-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.fd-quick-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(34, 85, 159, 0.2);
}

/* ===== Custom Range ===== */
.fd-filter-custom {
    animation: slideDown 0.25s ease;
    margin-bottom: 16px;
}

.fd-filter-custom .fd-field-group {
    margin-bottom: 12px;
}

/* ===== Period Display ===== */
.fd-period-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #EFF6FF;
    border-radius: var(--radius-sm);
    border-right: 4px solid var(--primary-color);
    font-size: 0.85rem;
    font-weight: 800;
    color: #1E3A8A;
}

.fd-period-display i {
    color: var(--primary-color);
}

/* ===== Summary Grid ===== */
.fd-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.fd-summary-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(34, 85, 159, 0.06);
    border: 1px solid rgba(34, 85, 159, 0.04);
    transition: all 0.25s ease;
}

.fd-summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(34, 85, 159, 0.1);
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-icon i {
    font-size: 1.3rem;
    color: white;
}

.summary-icon.blue { background: linear-gradient(135deg, #22559F, #1A437C); }
.summary-icon.green { background: linear-gradient(135deg, #39a66f, #2b8557); }
.summary-icon.orange { background: linear-gradient(135deg, #F59E0B, #D97706); }
.summary-icon.purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }

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

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 2px;
    font-weight: 700;
    line-height: 1.3;
}

.summary-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.summary-value.small {
    font-size: 0.95rem;
}

/* ===== Chart ===== */
.fd-chart-loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.fd-chart-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.fd-chart-loading p {
    margin: 0;
    font-size: 0.88rem;
}

.fd-chart-container {
    padding: 10px 0;
}

.fd-chart-scroll {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-height: 180px;
    padding: 10px 4px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.fd-chart-scroll::-webkit-scrollbar {
    height: 6px;
}

.fd-chart-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chart-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 36px;
    flex-shrink: 0;
}

.chart-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 150px;
}

.chart-bar {
    width: 14px;
    border-radius: 3px 3px 0 0;
    transition: all 0.3s ease;
    min-height: 2px;
    position: relative;
}

.chart-bar.scans { background: linear-gradient(180deg, #22559F, #1A437C); }
.chart-bar.locations { background: linear-gradient(180deg, #39a66f, #2b8557); }

.chart-bar:hover {
    filter: brightness(1.15);
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.chart-day-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 700;
    white-space: nowrap;
}

.fd-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.blue { background: linear-gradient(180deg, #22559F, #1A437C); }
.legend-dot.green { background: linear-gradient(180deg, #39a66f, #2b8557); }

/* ===== Tables ===== */
.fd-table-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.fd-table-loading i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.fd-table-container {
    overflow: hidden;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.fd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
    max-width: 100%;
}

.fd-table thead th {
    background: var(--bg-body);
    padding: 12px 14px;
    text-align: right;
    font-weight: 900;
    font-size: 0.78rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.fd-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.fd-table tbody tr:hover {
    background: #FAFBFF;
}

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

.fd-table .cell-num {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    color: var(--text-secondary);
    width: 55px;
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.fd-table thead th.cell-num,
.fd-table thead th:first-child {
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.fd-table .cell-time {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    direction: ltr;
    text-align: right;
    color: var(--text-secondary);
    width: 42%;
    word-break: break-word;
    white-space: normal;
}

.fd-table .cell-source {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: var(--bg-body);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    color: var(--primary-dark);
}

.fd-table .cell-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    max-width: 100%;
    word-break: break-word;
    line-height: 1.4;
}

.fd-table .cell-badge.success {
    background: #E8F5EE;
    color: #166534;
}

.fd-table .cell-badge.warning {
    background: #FEF3C7;
    color: #92400E;
}

.fd-table .cell-badge.info {
    background: #EFF6FF;
    color: #1E3A8A;
}

.fd-table .cell-badge.muted {
    background: #F3F4F6;
    color: var(--text-secondary);
}

.fd-table .cell-link {
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

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

.fd-table .cell-address {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===== Empty State ===== */
.fd-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.fd-empty-state i {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 12px;
    display: block;
}

.fd-empty-state p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .fd-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .fd-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fd-summary-card {
        padding: 14px;
    }

    .summary-icon {
        width: 44px;
        height: 44px;
    }

    .summary-icon i {
        font-size: 1.15rem;
    }

    .summary-value {
        font-size: 1.15rem;
    }

    .summary-value.small {
        font-size: 0.88rem;
    }

    .fd-quick-btn {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .fd-chart-scroll {
        min-height: 150px;
    }

    .chart-bars {
        height: 120px;
    }

    .fd-table {
        font-size: 0.75rem;
    }

    .fd-table thead th,
    .fd-table tbody td {
        padding: 8px 6px;
    }

    .fd-table .cell-time {
        font-size: 0.7rem;
        white-space: normal;
        word-break: break-word;
    }

    .fd-table .cell-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .fd-filter-quick {
        gap: 6px;
    }

    .fd-quick-btn {
        flex: 1 0 calc(50% - 3px);
        min-width: 0;
    }

    .fd-table .cell-address {
        max-width: 180px;
    }
}

/* ============================================================
   33. Table Toggle Button (Show/Hide More)
   ============================================================ */
.fd-table-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(180deg, #FAFBFF 0%, #F0F4FF 100%);
    border: none;
    border-top: 2px solid var(--border-color);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 48px;
}

.fd-table-toggle:hover {
    background: linear-gradient(180deg, #F0F4FF 0%, #DBEAFE 100%);
    color: var(--primary-dark);
}

.fd-table-toggle:active {
    transform: scale(0.995);
}

.fd-table-toggle .toggle-icon {
    font-size: 0.85rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fd-table-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.fd-table-toggle .toggle-text {
    letter-spacing: 0.2px;
}

/* Hidden rows (لما الجدول مطوي) */
.fd-table tbody tr.row-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .fd-table-toggle {
        padding: 12px 16px;
        font-size: 0.82rem;
        min-height: 44px;
    }
}

/* ============================================================
   34. Table Column Widths (لكل جدول)
   ============================================================ */

/* جدول سجل المسحات: # / التاريخ / التحقق */
#scanLogsTable .fd-table colgroup col:nth-child(1),
#scanLogsTable .fd-table th:nth-child(1),
#scanLogsTable .fd-table td:nth-child(1) {
    width: 55px;
}

#scanLogsTable .fd-table th:nth-child(2),
#scanLogsTable .fd-table td:nth-child(2) {
    width: 50%;
}

#scanLogsTable .fd-table th:nth-child(3),
#scanLogsTable .fd-table td:nth-child(3) {
    width: calc(50% - 55px);
}

/* جدول سجل المواقع: # / التاريخ / العنوان / الخريطة */
#locationLogsTable .fd-table th:nth-child(1),
#locationLogsTable .fd-table td:nth-child(1) {
    width: 55px;
}

#locationLogsTable .fd-table th:nth-child(2),
#locationLogsTable .fd-table td:nth-child(2) {
    width: 30%;
}

#locationLogsTable .fd-table th:nth-child(3),
#locationLogsTable .fd-table td:nth-child(3) {
    width: calc(70% - 55px - 80px);
}

#locationLogsTable .fd-table th:nth-child(4),
#locationLogsTable .fd-table td:nth-child(4) {
    width: 80px;
    text-align: center;
}

/* ============================================================
   35. Password Tab
   ============================================================ */

.fd-pwd-rules-box {
    background: #F0FDF4;
    border-right: 4px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
    transition: all 0.3s ease;
}

.fd-pwd-rules-box .rules-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--secondary-dark);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fd-pwd-rules-box .rules-title i {
    color: var(--secondary-color);
}

.fd-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fd-rules-list li {
    font-size: 0.82rem;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.fd-rules-list li i {
    color: #94A3B8;
    font-size: 0.55rem;
    background: #E2E8F0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

/* ✅ حالة النجاح */
.fd-rules-list li.valid {
    color: var(--secondary-dark);
    font-weight: 700;
}

.fd-rules-list li.valid i {
    background: var(--secondary-color);
    color: white;
    font-size: 0.6rem;
}

/* ❌ حالة الفشل */
.fd-rules-list li.invalid {
    color: #991B1B;
}

.fd-rules-list li.invalid i {
    background: var(--danger-color);
    color: white;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .fd-rules-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .fd-pwd-rules-box {
        padding: 12px 14px;
    }

    .fd-rules-list li {
        font-size: 0.78rem;
    }
}

/* ============================================================
   36. Contact Tab
   ============================================================ */

/* ===== Contact Methods ===== */
.fd-contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.fd-contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-height: 140px;
    justify-content: center;
}

.fd-contact-method:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.fd-contact-method .method-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.fd-contact-method:hover .method-icon {
    transform: scale(1.08) rotate(-5deg);
}

.fd-contact-method .method-icon i {
    color: white;
    font-size: 1.4rem;
}

.fd-contact-method .method-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    width: 100%;
}

.fd-contact-method .method-info strong {
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.3;
}

.fd-contact-method .method-info small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.3;
}

/* ===== Colors per method ===== */
.fd-contact-whatsapp .method-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
}
.fd-contact-whatsapp:hover {
    border-color: #25D366;
}
.fd-contact-whatsapp:hover .method-info strong {
    color: #128C7E;
}

.fd-contact-email .method-icon {
    background: linear-gradient(135deg, #22559F, #1A437C);
}
.fd-contact-email:hover {
    border-color: #22559F;
}
.fd-contact-email:hover .method-info strong {
    color: #1A437C;
}

.fd-contact-telegram .method-icon {
    background: linear-gradient(135deg, #0088CC, #006699);
}
.fd-contact-telegram:hover {
    border-color: #0088CC;
}
.fd-contact-telegram:hover .method-info strong {
    color: #006699;
}

/* ===== Contact Form ===== */
#tab-contact select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
    cursor: pointer;
}

#tab-contact select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(34, 85, 159, 0.08);
}

#tab-contact textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

#tab-contact textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(34, 85, 159, 0.08);
}

/* ===== Char Counter ===== */
.char-counter {
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 600;
    direction: ltr;
}

.char-counter.warning {
    color: #F59E0B;
}

.char-counter.danger {
    color: var(--danger-color);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .fd-contact-methods {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .fd-contact-method {
        flex-direction: row;
        text-align: right;
        min-height: 80px;
        padding: 14px 16px;
        gap: 14px;
    }

    .fd-contact-method .method-icon {
        width: 48px;
        height: 48px;
    }

    .fd-contact-method .method-icon i {
        font-size: 1.2rem;
    }

    .fd-contact-method .method-info {
        text-align: right;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .fd-contact-method {
        padding: 12px 14px;
        min-height: 70px;
    }

    .fd-contact-method .method-icon {
        width: 44px;
        height: 44px;
    }

    .fd-contact-method .method-icon i {
        font-size: 1.1rem;
    }

    .fd-contact-method .method-info strong {
        font-size: 0.88rem;
    }

    .fd-contact-method .method-info small {
        font-size: 0.72rem;
    }

    #tab-contact textarea {
        min-height: 120px;
        font-size: 16px; /* prevent iOS zoom */
    }

    #tab-contact select {
        font-size: 16px;
    }
}

/* ============================================================
   37. Contact - Email Readonly
   ============================================================ */

.fd-email-readonly {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F3F4F6;
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    min-height: 48px;
}

.fd-email-readonly input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    direction: ltr;
    text-align: left;
    cursor: not-allowed;
    pointer-events: none;
    outline: none;
    min-height: auto;
    height: auto;
}

.fd-email-readonly input:disabled {
    background: transparent !important;
    color: var(--text-primary);
    opacity: 1;
    -webkit-text-fill-color: var(--text-primary);
}

.fd-email-readonly i {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* حالة البريد الفاضي */
.fd-email-readonly.empty {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.fd-email-readonly.empty i {
    color: #D97706;
}

.fd-email-readonly.empty input {
    -webkit-text-fill-color: #92400E;
    color: #92400E;
    font-family: inherit;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 480px) {
    .fd-email-readonly {
        padding: 10px 14px;
    }

    .fd-email-readonly input {
        font-size: 16px; /* prevent iOS zoom */
    }
}

/* ============================================================
   38. Initial Loader + Error State
   ============================================================ */

/* ===== Loader ===== */
.fd-initial-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 50%, #DBEAFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fdLoaderFadeIn 0.2s ease;
}

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

.fd-initial-loader-box {
    text-align: center;
    padding: 30px;
    max-width: 320px;
}

.fd-initial-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(34, 85, 159, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: fdSpinnerSpin 0.9s linear infinite;
}

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

.fd-initial-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 6px;
    font-family: 'Cairo', sans-serif;
}

.fd-initial-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    font-family: 'Cairo', sans-serif;
}

/* ===== Error State ===== */
.fd-initial-error {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #FEF2F2 0%, #F8FAFC 50%, #FEE2E2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fdLoaderFadeIn 0.3s ease;
    padding: 16px;
}

.fd-initial-error-box {
    background: white;
    border-radius: 24px;
    padding: 36px 28px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(230, 57, 70, 0.15);
    animation: fdErrorPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fdErrorPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fd-initial-error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: var(--danger-color);
    border: 4px solid var(--danger-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 18px;
}

.fd-initial-error-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--danger-color);
    margin: 0 0 10px;
    font-family: 'Cairo', sans-serif;
}

.fd-initial-error-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 22px;
    padding: 0 10px;
    font-family: 'Cairo', sans-serif;
}

.fd-initial-retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 52px;
    box-shadow: 0 6px 18px rgba(34, 85, 159, 0.25);
    width: 100%;
    max-width: 300px;
}

.fd-initial-retry-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(34, 85, 159, 0.4);
}

.fd-initial-retry-btn:active {
    transform: scale(0.98);
}

.fd-initial-retry-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.fd-initial-retry-btn i {
    font-size: 1.1rem;
}

/* ===== Hide Class ===== */
.fd-initial-loader.hidden,
.fd-initial-error.hidden {
    display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .fd-initial-spinner {
        width: 56px;
        height: 56px;
    }

    .fd-initial-error-box {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .fd-initial-error-icon {
        width: 68px;
        height: 68px;
        font-size: 1.7rem;
    }

    .fd-initial-error-title {
        font-size: 1.15rem;
    }

    .fd-initial-error-message {
        font-size: 0.88rem;
    }

    .fd-initial-retry-btn {
        font-size: 0.95rem;
        min-height: 48px;
    }
}

/* ============================================================
   39. Disable / Enable Account + Court Warning
   ============================================================ */

/* ===== Danger Zone Updates ===== */
.fd-disable-desc {
    background: #FFFBEB !important;
    border-right-color: var(--warning-color) !important;
    color: #78350F !important;
}

.fd-disable-desc strong {
    color: #92400E !important;
}

.fd-disable-desc i {
    color: var(--warning-color) !important;
}

/* ===== Buttons (Warning + Success) ===== */
.btn-warning {
    background-color: transparent !important;
    background-image: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: white;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-warning:hover:not(:disabled) {
    background-color: transparent !important;
    background-image: linear-gradient(135deg, #F59E0B, #D97706) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background-color: transparent !important;
    background-image: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark)) !important;
    color: white;
    box-shadow: 0 6px 18px rgba(57, 166, 111, 0.25);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-success:hover:not(:disabled) {
    background-color: transparent !important;
    background-image: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark)) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(57, 166, 111, 0.4);
}

/* ===== Modal Icons ===== */
.fd-warning-icon {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #D97706;
    border: 4px solid var(--warning-color);
}

.fd-success-icon {
    background: linear-gradient(135deg, #E8F5EE 0%, #D1FAE5 100%);
    color: var(--secondary-color);
    border: 4px solid var(--secondary-color);
}

/* ===== Warning Boxes ===== */
.fd-warning-box-warning {
    background: #FEF3C7;
    border-right-color: var(--warning-color);
}

.fd-warning-box-warning .warnings-title {
    color: #92400E;
}

.fd-warning-box-warning .warnings-list li {
    color: #78350F;
}

.fd-warning-box-warning .warnings-list li i.fa-check {
    background: var(--secondary-color) !important;
    color: white !important;
}

.fd-warning-box-warning .warnings-list li i.fa-times {
    background: var(--warning-color) !important;
    color: white !important;
}

/* ===== Info Box Success ===== */
.fd-info-box-success {
    background: #E8F5EE;
    border-right: 4px solid var(--secondary-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 22px;
}

.fd-info-box-success .info-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--secondary-dark);
    margin: 0 0 12px;
}

.fd-info-box-success .info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fd-info-box-success .info-list li {
    font-size: 0.88rem;
    color: #166534;
    font-weight: 700;
    line-height: 1.6;
}

/* ===== Court Warning ===== */
.fd-court-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FFFBEB 100%);
    border: 2px solid var(--warning-color);
    border-radius: var(--radius-md);
    padding: 24px 22px;
    margin: 18px 0;
    text-align: center;
    animation: fadeInUp 0.4s ease;
}

.fd-court-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%);
    color: #92400E;
    border: 3px solid var(--warning-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 14px;
}

.fd-court-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #92400E;
    margin: 0 0 10px;
}

.fd-court-message {
    font-size: 0.92rem;
    color: #78350F;
    line-height: 1.7;
    margin: 0 0 20px;
    padding: 0 8px;
}

.fd-court-message strong {
    color: #92400E;
    font-weight: 900;
}

#courtDisableInsteadBtn {
    min-height: 50px;
    font-size: 0.95rem;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .fd-court-warning {
        padding: 18px 16px;
    }

    .fd-court-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .fd-court-title {
        font-size: 1.05rem;
    }

    .fd-court-message {
        font-size: 0.85rem;
    }

    .fd-warning-box-warning {
        padding: 14px 16px;
    }

    .fd-warning-box-warning .warnings-list li {
        font-size: 0.82rem;
    }
}

/* ============================================================
   40. Delete Modal — Court Mode (لا يمكن الحذف)
   ============================================================ */

/* إخفاء كل سكاشن الحذف العادي */
#deleteAccountModal.court-mode .fd-modal-header,
#deleteAccountModal.court-mode .fd-warnings-box,
#deleteAccountModal.court-mode .fd-refund-link-box {
    display: none !important;
}

/* توسيط سكشن "لا يمكن الحذف" */
#deleteAccountModal.court-mode .fd-court-warning {
    margin-top: 8px;
    margin-bottom: 0;
}

/* ============================================================
   40. No Header Mode (Family Dashboard)
   - لما الهيدر مش موجود
   ============================================================ */

/* ✅ إزالة padding الـ header من الـ body */
.family-dashboard-page.no-header {
    padding-top: 20px;
}

/* ✅ تعديل موضع الـ Sidebar على Desktop */
.family-dashboard-page.no-header .fd-sidebar {
    top: 20px;
    max-height: calc(100vh - 40px);
}

/* ✅ Responsive — Tablet */
@media (max-width: 1024px) {
    .family-dashboard-page.no-header {
        padding-top: 16px;
    }

    .family-dashboard-page.no-header .fd-sidebar {
        top: 16px;
        max-height: calc(100vh - 32px);
    }
}

/* ✅ Responsive — Mobile (السايدبار يبقى Drawer) */
@media (max-width: 768px) {
    .family-dashboard-page.no-header {
        padding-top: 12px;
    }

    .family-dashboard-page.no-header .fd-sidebar {
        top: 0;
        max-height: 100vh;
        padding: 24px 16px 20px;  /* بدل 70px */
    }
}

/* ============================================================
   🚪 Exit Confirmation Modal
   ============================================================ */
.fd-exit-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fdExitFadeIn 0.2s ease-out;
}

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

.fd-exit-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 24px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fdExitSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fdExitSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fd-exit-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #D97706;
}

.fd-exit-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0 0 8px;
    font-family: 'Cairo', sans-serif;
}

.fd-exit-subtitle {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.7;
    margin: 0 0 24px;
    font-family: 'Cairo', sans-serif;
}

.fd-exit-actions {
    display: flex;
    gap: 10px;
}

.fd-exit-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.fd-exit-btn-cancel {
    background: #F1F5F9;
    color: #334155;
}

.fd-exit-btn-cancel:hover {
    background: #E2E8F0;
    transform: translateY(-1px);
}

.fd-exit-btn-confirm {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #ffffff;
}

.fd-exit-btn-confirm:hover {
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

@media (max-width: 480px) {
    .fd-exit-actions {
        flex-direction: column-reverse;
    }
}