/* 
 * Pro Derma Ecosystem - App Style
 * Premium Modern App-Like Design
 * Version: 2.0.0
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --pd-primary: #163626;
    /* Deep Clinical Green */
    --pd-secondary: #2a5a40;
    /* Vibrant Medical Green */
    --pd-accent: #0cb8b6;
    /* Healing Teal */
    --pd-bg: #f8fafc;
    --pd-card-bg: #ffffff;
    --pd-text: #1e293b;
    --pd-text-light: #64748b;
    --pd-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --pd-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.08);
    --pd-radius: 24px;
    --pd-header-height: 70px;
    --pd-footer-height: 90px;
    --pd-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --pd-dark: #023047;
}

/* Layout & Containers */
.pd-app-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
}

@media (max-width: 768px) {
    .pd-app-container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Pro Derma Experience Footer - Enhanced Floating Design */
.pd-footer-experience {
    --f-bg: rgba(7, 26, 18, 0.95);
    --f-accent: #0cb8b6;
    --f-text: #ffffff;
    --f-blur: 25px;
}

/* Mobile App-like Bottom Nav */
/* Mobile App-like Bottom Nav - Reimagined for High-End Luxury */
.pd-mobile-nav {
    position: fixed;
    bottom: 25px;
    left: 15px;
    right: 15px;
    height: 70px;
    background: rgba(7, 26, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 8px;
    transition: var(--pd-transition);
}

body.pd-app-active {
    padding-bottom: 120px !important;
}

@media (min-width: 1025px) {
    .pd-mobile-nav {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
    }
}

.pd-mob-item {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    gap: 4px;
    transition: var(--pd-transition);
    flex: 1;
    position: relative;
}

.pd-mob-item.active {
    color: var(--pd-accent);
}

.pd-mob-item:active {
    transform: scale(0.9);
}

.pd-mob-icon {
    font-size: 20px;
}

.pd-mob-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Center AI Orb - High-Tech Clinical Aesthetic */
.pd-mob-center-orb {
    position: relative;
    top: -32px;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #163626 0%, #0cb8b6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(12, 184, 182, 0.4);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid #071a12;
}

.pd-mob-center-orb::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #0cb8b6, transparent, #0cb8b6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateOrb 4s linear infinite;
}

@keyframes rotateOrb {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.pd-mob-center-orb::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid var(--pd-accent);
    opacity: 0;
    animation: pd-orb-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pd-orb-ping {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    80%,
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.pd-orb-inner .dashicons {
    color: white;
    font-size: 32px !important;
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* App Sidebar - Luxury Drawer */
.pd-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--pd-transition);
}

.pd-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pd-app-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: #071a12;
    z-index: 10001;
    transition: right 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 40px 30px;
    box-shadow: none;
    /* Shadow removed when sidebar is off-screen */
    display: flex;
    flex-direction: column;
    color: white;
    visibility: hidden;
    /* Added to prevent shadow artifacts */
}

.pd-app-sidebar.active {
    right: 0;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.6);
    visibility: visible;
}

.pd-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.pd-close-sidebar {
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: var(--pd-transition);
}

.pd-close-sidebar:hover {
    background: var(--pd-accent);
    transform: rotate(90deg);
}

.pd-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.pd-sidebar-nav li {
    margin-bottom: 8px;
}

.pd-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none !important;
    font-weight: 600;
    border-radius: 18px;
    transition: var(--pd-transition);
}

.pd-sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(10px);
}

.pd-sidebar-nav a .dashicons {
    color: var(--pd-accent);
    font-size: 20px;
}

.pd-nav-admin {
    background: rgba(22, 54, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pd-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 20px 0;
}

.pd-sidebar-footer {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pd-sidebar-ai-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-secondary) 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--pd-transition);
    margin-bottom: 20px;
}

.pd-sidebar-ai-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(22, 54, 38, 0.5);
}

.pd-dha-license {
    font-size: 11px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

/* Hide original desktop elements if they collide */
.pd-sidebar-trigger-btn,
.pd-medical-orb {
    display: none !important;
}

@media (max-width: 768px) {
    .pd-app-sidebar {
        max-width: none;
        width: 100%;
        border-radius: 0;
    }

    body.pd-menu-open {
        overflow: hidden;
    }
}

.pd-tab-center-btn:hover {
    transform: scale(1.1) translateY(-5px);
}

.pd-center-btn-inner .dashicons {
    color: white;
    font-size: 32px !important;
    width: 32px;
    height: 32px;
}

/* Premium Card System */
.pd-card {
    background: var(--pd-card-bg);
    border-radius: var(--pd-radius);
    padding: 35px;
    box-shadow: var(--pd-shadow);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--pd-transition);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.pd-card.mx-auto {
    max-width: 900px;
}

.pd-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pd-shadow-hover);
}

/* Forms & Inputs */
.pd-form-group {
    margin-bottom: 25px;
}

.pd-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--pd-primary);
}

.pd-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    transition: var(--pd-transition);
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.pd-input:focus {
    border-color: var(--pd-secondary);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(197, 160, 89, 0.1);
}

/* Results Gallery Grid */
.pd-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

.pd-result-item {
    border-radius: var(--pd-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--pd-shadow);
    transition: var(--pd-transition);
}

.pd-result-item:hover {
    transform: scale(1.02);
}

/* Premium Buttons */
.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 35px;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--pd-transition);
    border: none;
    gap: 12px;
    text-decoration: none !important;
    font-size: 1rem;
}

.pd-btn-primary {
    background: var(--pd-primary);
    color: #fff !important;
}

.pd-btn-gold {
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-secondary) 100%);
    color: #fff !important;
}

.pd-btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: var(--pd-text) !important;
}

/* Modals */
.pd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pd-modal.active {
    display: flex;
}

.pd-modal-content {
    background: #fff;
    border-radius: 32px;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

/* Dashboard Stats */
.pd-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pd-stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.pd-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pd-secondary);
    font-family: 'Playfair Display', serif;
}

/* Header Action Buttons */
.pd-header-actions {
    display: flex;
    gap: 10px;
}

.pd-icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--pd-text);
    transition: var(--pd-transition);
}

.pd-icon-btn:hover {
    background: var(--pd-secondary);
    color: #fff;
}

/* RTL Support for Arabic Content */
.pd-rtl {
    direction: rtl;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pd-animate-in {
    animation: slideUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Admin Specific */
.admin-choice {
    background: var(--pd-primary) !important;
    color: white !important;
}

.admin-choice span,
.admin-choice p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* High Resolution Display Fixes */
@media (min-width: 1440px) {
    .pd-app-container {
        max-width: 1300px;
    }
}

/* Pro Derma Portal Experience - Premium Clinical Style */
.pd-portal-experience {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    font-family: 'Outfit', sans-serif;
}

.pd-portal-sidebar {
    width: 320px;
    background: #071a12;
    color: white;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    transition: var(--pd-transition);
    z-index: 100;
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 25px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.user-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    border: 3px solid var(--pd-accent);
}

.online-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: #4ade80;
    border: 3px solid #071a12;
    border-radius: 50%;
}

.user-info h3 {
    font-size: 1.2rem;
    margin: 0 0 5px;
    color: white;
}

.member-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--pd-accent);
    text-transform: uppercase;
}

.pd-portal-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none !important;
    font-weight: 600;
    border-radius: 16px;
    transition: var(--pd-transition);
}

.pd-nav-link.active {
    background: var(--pd-accent);
    color: white;
    box-shadow: 0 10px 20px rgba(12, 184, 182, 0.2);
}

.pd-nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.pd-portal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.pd-portal-header {
    background: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
}

.pd-portal-btn-primary {
    background: var(--pd-primary);
    color: white !important;
    padding: 12px 25px;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    transition: var(--pd-transition);
}

.pd-portal-body {
    padding: 40px;
    max-width: 1200px;
}

/* Membership Banner */
.membership-banner {
    background: linear-gradient(135deg, #163626 0%, #2a5a40 100%);
    border-radius: 30px;
    padding: 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(22, 54, 38, 0.2);
}

.tier-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stat Cards */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card-luxury {
    background: white;
    padding: 35px;
    border-radius: 30px;
    border: 1px solid #edf2f7;
    text-align: center;
    transition: var(--pd-transition);
}

.stat-card-luxury:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stat-card-luxury h2 {
    font-size: 3rem;
    color: var(--pd-primary);
    margin: 15px 0 5px;
}

.stat-icon {
    font-size: 30px;
    color: var(--pd-accent);
}

/* Mobile Toggle */
.portal-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--pd-primary);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .pd-portal-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
    }

    .pd-portal-sidebar.mobile-active {
        left: 0;
    }

    .portal-mobile-toggle {
        display: block;
    }

    .pd-portal-header {
        padding: 20px;
    }

    .pd-portal-body {
        padding: 20px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .membership-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .pd-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .pd-card {
        padding: 25px;
    }

    .pd-app-footer {
        max-width: none;
        width: calc(100% - 30px);
        bottom: 15px;
    }
}