/**
 * Devora Platform - Luxury Design System & UI Engine
 * Fully Responsive (Mobile First & Desktop Perfected)
 * RTL / LTR & Dark / Light Modes Native
 */

/* --------------------------------------------------
 * CSS Variables & Theme Palettes
 * -------------------------------------------------- */
:root {
    /* Brand Colors */
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-light: rgba(59, 130, 246, 0.12);
    --accent-gold: #D97706;
    --accent-gold-light: rgba(217, 119, 6, 0.12);
    
    /* Semantic Colors */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.12);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.12);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.12);
    --info: #06B6D4;
    --info-light: rgba(6, 182, 212, 0.12);

    /* Radii & Transitions */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Palette (Default Crisp Pearl) */
:root, [data-theme="light"] {
    --bg-main: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F1F5F9;
    --bg-glass: rgba(255, 255, 255, 0.88);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.16);
    
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-dim: #94A3B8;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* Dark Palette (Luxury Obsidian) */
[data-theme="dark"] {
    --bg-main: #0B0E14;
    --bg-surface: #121722;
    --bg-surface-elevated: #1A2232;
    --bg-glass: rgba(18, 23, 34, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.18);
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------
 * Base & Typography Resets
 * -------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.7;
    font-family: var(--font-sans);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic & English Typography Hygiene - Prevent ugly word breaking */
p, h1, h2, h3, h4, h5, h6, span, a, div, li, td, th {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* --------------------------------------------------
 * Container & Layout
 * -------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --------------------------------------------------
 * Header & Navigation
 * -------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    flex-shrink: 0;
}

.brand-logo .logo-mark,
.brand-logo .logo-mark-img {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    flex-shrink: 0;
    transition: var(--transition);
}

.brand-logo:hover .logo-mark-img {
    transform: scale(1.06);
}

.brand-logo .logo-mark {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0.25rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--primary), #8B5CF6);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

/* Action Icon Buttons */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-icon:hover {
    color: var(--text-main);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-icon .badge-dot {
    position: absolute;
    top: 4px;
    inset-inline-end: 4px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

/* --------------------------------------------------
 * Buttons
 * -------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-surface);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-danger {
    background: var(--danger);
    color: #FFF;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.38rem 0.85rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.8rem 1.75rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------
 * Hero Section
 * -------------------------------------------------- */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12) 0%, rgba(11, 14, 20, 0) 70%);
}

.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 80%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    background: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.hero-title {
    font-size: clamp(1.85rem, 5.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    text-wrap: balance;
}

.hero-title-line {
    display: block;
}

.hero-title-line:first-child {
    margin-bottom: 0.1rem;
}

.hero-title .gradient-text,
.gradient-text {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #F472B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-bottom: 0.28em;
    padding-top: 0.05em;
    margin-bottom: -0.28em;
    line-height: inherit;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    text-wrap: pretty;
    padding: 0 0.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

/* Stats Row */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.75rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    transition: var(--transition);
}

.stat-number {
    font-size: clamp(1.8rem, 3.5vw, 2.3rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -0.5px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
    display: inline-block;
}

.stat-item:hover .stat-number {
    color: var(--primary);
    transform: translateY(-2px) scale(1.06);
}

.stat-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.4;
}

/* --------------------------------------------------
 * Sections, Grids & Cards
 * -------------------------------------------------- */
.section {
    padding: 4.5rem 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title-wrap {
    max-width: 600px;
}

.section-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.category-card:hover .category-icon-wrap {
    background: var(--primary);
    color: #FFF;
    transform: scale(1.08);
}

.category-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Services Grid & Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-thumb {
    position: relative;
    width: 100%;
    height: 210px;
    background: var(--bg-surface-elevated);
    overflow: hidden;
}

.service-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-thumb img {
    transform: scale(1.04);
}

.service-badges {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.badge {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-featured {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    color: #FFFFFF;
}

.badge-discount {
    background: var(--danger);
    color: #FFFFFF;
}

.badge-status-pending_payment {
    background: var(--warning-light);
    color: var(--warning);
}
.badge-status-payment_verified {
    background: var(--info-light);
    color: var(--info);
}
.badge-status-processing {
    background: var(--primary-light);
    color: var(--primary);
}
.badge-status-completed {
    background: var(--success-light);
    color: var(--success);
}
.badge-status-rejected, .badge-status-cancelled {
    background: var(--danger-light);
    color: var(--danger);
}

.service-favorite-btn {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(18, 23, 34, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.service-favorite-btn:hover, .service-favorite-btn.active {
    color: var(--danger);
    background: #FFF;
    border-color: #FFF;
}

.service-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.service-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.service-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    white-space: nowrap !important;
    flex-shrink: 0;
    min-width: 0;
}

.price-current {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap !important;
    display: inline-block;
    line-height: 1.25;
}

.price-old {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: line-through;
    white-space: nowrap !important;
    display: inline-block;
    line-height: 1.25;
}

.service-footer .btn {
    white-space: nowrap;
    padding: 0.42rem 0.8rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Active Category Filter Chip */
.active-category-filter-wrap {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.active-category-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    background: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.35);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--primary);
    max-width: 100%;
}

.chip-tag-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.chip-category-name {
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
    word-break: break-word;
}

.chip-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    flex-shrink: 0;
}

.chip-close-btn:hover {
    background: var(--primary);
    color: #FFFFFF !important;
}

@media (max-width: 600px) {
    .active-category-filter-wrap {
        margin-bottom: 1.25rem;
    }
    .active-category-filter-chip {
        width: 100%;
        border-radius: var(--radius-md);
        padding: 0.55rem 0.75rem;
    }
}

/* Why Us Grid */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.why-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: var(--transition);
}

.why-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.why-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.why-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.why-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.cta-banner h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.cta-banner p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* --------------------------------------------------
 * Forms & Inputs
 * -------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--bg-surface);
}

/* Password Input Wrapper with Toggle Eye Icon */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-inline-end: 2.75rem !important;
}

.password-toggle-btn {
    position: absolute;
    inset-inline-end: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.35rem;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    z-index: 2;
}

.password-toggle-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* --------------------------------------------------
 * Tables
 * -------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
    font-size: 0.9rem;
}

.table th {
    background: var(--bg-surface-elevated);
    padding: 0.9rem 1.1rem;
    font-weight: 700;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:hover td {
    background: var(--bg-surface-elevated);
}

/* --------------------------------------------------
/* --------------------------------------------------
 * Centered Square Notification Modal with Blue Progress Bar
 * -------------------------------------------------- */
.devora-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: devoraFadeIn 0.2s ease-out;
}

.devora-center-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem 2rem;
    width: 100%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: devoraPopIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Bottom Glowing Blue Progress Bar */
.devora-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4.5px;
    background: rgba(59, 130, 246, 0.15);
    overflow: hidden;
}

.devora-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563EB, #3B82F6, #60A5FA);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.9);
    animation: devoraBottomProgress 0.5s linear forwards;
}

@keyframes devoraBottomProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.devora-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px var(--primary-light);
}

.devora-modal-icon.icon-success {
    background: var(--success-light);
    color: var(--success);
    box-shadow: 0 0 0 6px var(--success-light);
}

.devora-modal-icon.icon-error {
    background: var(--danger-light);
    color: var(--danger);
    box-shadow: 0 0 0 6px var(--danger-light);
}

.devora-modal-icon.icon-warning {
    background: var(--warning-light);
    color: var(--warning);
    box-shadow: 0 0 0 6px var(--warning-light);
}

.devora-modal-icon.icon-info {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 6px var(--primary-light);
}

.devora-modal-message {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    text-wrap: balance;
}

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

@keyframes devoraPopIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------
 * Custom Devora Confirmation Dialog (Replaces native browser confirm)
 * -------------------------------------------------- */
.devora-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: devoraFadeIn 0.2s ease-out;
}

.devora-confirm-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: devoraPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.devora-confirm-icon {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.devora-confirm-icon.icon-danger {
    background: var(--danger-light);
    color: var(--danger);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15);
}

.devora-confirm-icon.icon-info {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15);
}

.devora-confirm-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.devora-confirm-message {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    text-wrap: pretty;
}

.devora-confirm-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.devora-confirm-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-weight: 700;
}

@media (max-width: 480px) {
    .devora-confirm-modal {
        padding: 1.75rem 1.25rem;
    }
    
    .devora-confirm-actions {
        flex-direction: column-reverse;
    }
}

.toast-container {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.active {
    display: flex;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------
 * Footer
 * -------------------------------------------------- */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 1rem 0 1.5rem;
    max-width: 360px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-col h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    text-align: center;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.footer-col li {
    text-align: center;
    width: 100%;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    display: inline-block;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-bottom div {
    text-align: center;
    width: 100%;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.social-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* --------------------------------------------------
 * Dashboard Layout (Customer & Admin)
 * -------------------------------------------------- */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 76px);
}

.admin-brand-container {
    width: 245px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 992px) {
    .admin-brand-container {
        width: auto;
    }
}

.dashboard-sidebar {
    width: 270px;
    background: var(--bg-surface);
    border-inline-end: 1px solid var(--border-color);
    padding: 1.5rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    max-height: calc(100vh - 76px);
    overflow: hidden;
    z-index: 90;
}

.dashboard-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
    background: var(--bg-main);
    min-width: 0;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    padding-inline-end: 0.25rem;
    scrollbar-width: thin;
}

.sidebar-section-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-dim);
    margin: 1.25rem 0.5rem 0.45rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
}

.sidebar-section-title:first-child {
    margin-top: 0.25rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.68rem 0.95rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
}

.sidebar-item a:hover, .sidebar-item.active a {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-item-logout a:hover {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
}

.sidebar-logout-section {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-user-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.sidebar-user-details {
    min-width: 0;
    flex-grow: 1;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-logout-button:hover {
    background: var(--danger) !important;
    color: #FFFFFF !important;
    border-color: var(--danger) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.admin-topbar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    background: rgba(239, 68, 68, 0.05);
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    transition: var(--transition);
}

.admin-topbar-logout-btn:hover {
    background: var(--danger) !important;
    color: #FFFFFF !important;
    border-color: var(--danger) !important;
}

.sidebar-item-mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .admin-topbar-logout-btn {
        display: none !important;
    }
    .sidebar-item-mobile-only {
        display: block;
    }
}

@media (max-width: 600px) {
    .admin-topbar-logout-btn .logout-btn-label {
        display: none;
    }
    .admin-topbar-logout-btn {
        padding: 0.45rem;
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 900px) {
    .sidebar-section-title {
        display: none !important;
    }
}

/* --------------------------------------------------
 * 📱 Mobile Responsive Master Breakpoints
 * -------------------------------------------------- */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .dashboard-layout {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        border-inline-end: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.75rem 1rem;
        background: var(--bg-surface);
        position: sticky;
        top: 64px;
        z-index: 99;
    }

    .dashboard-sidebar > div:last-child {
        display: none !important;
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
        gap: 0.5rem;
    }

    .sidebar-item a {
        white-space: nowrap;
        padding: 0.45rem 0.85rem;
        font-size: 0.82rem;
        border: 1px solid var(--border-color);
        background: var(--bg-surface-elevated);
        border-radius: var(--radius-full);
    }

    .sidebar-item.active a,
    .sidebar-item a:hover {
        background: var(--primary-light);
        border-color: var(--primary);
        color: var(--primary);
    }

    .dashboard-content {
        padding: 1.5rem 1rem;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-inner {
        height: 64px;
        gap: 0.5rem;
    }

    .brand-logo {
        font-size: 1.15rem;
        gap: 0.45rem;
    }

    .brand-logo .logo-mark {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    /* Hide extra text in account/admin button on mobile to prevent header overflow */
    .btn-account-text {
        display: none !important;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.28;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.75;
        margin-bottom: 1.75rem;
        padding: 0;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        gap: 0.75rem;
        margin-bottom: 2.25rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem 0.5rem;
    }

    .stat-item {
        padding: 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section {
        padding: 3rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-card {
        padding: 1.25rem 0.75rem;
    }

    .category-icon-wrap {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }

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

    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cta-banner {
        padding: 2.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .toast-container {
        inset-inline-start: 1rem;
        inset-inline-end: 1rem;
        max-width: none;
        bottom: 1rem;
    }

    /* (End of max-width: 768px) */
}

/* --------------------------------------------------
 * Centered Footer on Tablets, iPad Air & Mobile (<= 992px)
 * -------------------------------------------------- */
@media (max-width: 992px) {
    .footer {
        text-align: center !important;
        padding: 3.5rem 0 2rem !important;
    }

    .footer .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 580px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 2.25rem !important;
    }

    .footer-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .footer-brand .brand-logo {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto 0.75rem !important;
        text-align: center !important;
    }

    .footer-brand p {
        text-align: center !important;
        margin: 0.5rem auto 1.25rem !important;
        max-width: 480px !important;
        line-height: 1.8 !important;
    }

    .footer-brand .social-links {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 auto !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }

    .footer-col {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .footer-col h4 {
        text-align: center !important;
        margin-bottom: 0.85rem !important;
        width: 100% !important;
    }

    .footer-col ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        gap: 0.75rem !important;
    }

    .footer-col li {
        text-align: center !important;
        width: 100% !important;
    }

    .footer-col a {
        text-align: center !important;
        display: inline-block !important;
        padding: 0.2rem 0 !important;
    }

    .footer-bottom {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }

    .footer-bottom div {
        text-align: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
}

/* Very Small Mobile Screens (<= 480px) */
@media (max-width: 480px) {
    .brand-logo span:last-child {
        display: none; /* Hide "| ديڤورا" on ultra small screens so header never wraps */
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.45;
    }
}

