:root {
    --button-outline: rgba(0,0,0, .10);
    --badge-outline: rgba(0,0,0, .05);
    --elevate-1: rgba(0,0,0, .03);
    --elevate-2: rgba(0,0,0, .08);
    --background: #ffffff;
    --foreground: #1e293b;
    --border: #e2e8f0;
    --card: #fafafa;
    --card-foreground: #1e293b;
    --sidebar-bg: hsl(189, 100%, 18%);
    --sidebar-bg-dark: hsl(189, 80%, 14%);
    --sidebar-accent: hsl(170, 48%, 57%);
    --sidebar-accent-hover: hsl(189, 60%, 22%);
    --primary: #008080;
    --primary-rgb: 0, 128, 128;
    --primary-dark: #006666;
    --primary-light: #4DB6AC;
    --primary-foreground: #ffffff;
    --secondary: #e2e8f0;
    --secondary-foreground: #1e293b;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #E0F7F6;
    --accent-foreground: #008080;
    --destructive: #ef4444;
    --success: #16a34a;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --radius: 0.5rem;
    --nav-bg: rgba(255,255,255,0.95);
    --nav-border: var(--border);
    --offcanvas-bg: #ffffff;
    --auth-bg: #f1f5f9;
    --auth-card-bg: #ffffff;
    --input-bg: #ffffff;
    --slug-prefix-bg: #f1f5f9;
    --review-box-bg: #f8fafc;
}

html.dark-mode {
    --button-outline: rgba(255,255,255, .10);
    --badge-outline: rgba(255,255,255, .05);
    --elevate-1: rgba(255,255,255, .04);
    --elevate-2: rgba(255,255,255, .09);
    --background: #0f172a;
    --foreground: #e2e8f0;
    --border: #1e293b;
    --card: #1a2744;
    --card-foreground: #e2e8f0;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --accent: #0c2a2a;
    --accent-foreground: #4DB6AC;
    --secondary: #1e293b;
    --secondary-foreground: #e2e8f0;
    --nav-bg: rgba(15, 23, 42, 0.97);
    --nav-border: rgba(255,255,255,0.07);
    --offcanvas-bg: #0f172a;
    --auth-bg: #0f172a;
    --auth-card-bg: #1a2744;
    --input-bg: #1e293b;
    --slug-prefix-bg: #0f172a;
    --review-box-bg: #1a2744;
}

* {
    font-family: 'Tajawal', 'Cairo', 'IBM Plex Sans Arabic', 'Inter', -apple-system, sans-serif;
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--muted); border-radius: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), 0.4); border-radius: 10px; border: 2px solid var(--muted); }
*::-webkit-scrollbar-thumb:hover { background: rgba(var(--primary-rgb), 0.6); }
* { scrollbar-width: thin; scrollbar-color: rgba(var(--primary-rgb), 0.4) var(--muted); }

.btn-primary, .btn-primary:active { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.btn-outline-secondary { border-color: var(--border) !important; color: var(--foreground) !important; }
.btn-outline-secondary:hover { background: var(--muted) !important; color: var(--foreground) !important; }

.badge-primary { background: var(--primary); color: #fff; }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.25s ease;
    color: var(--card-foreground);
}

.hover-elevate {
    position: relative;
    z-index: 0;
    transition: all 0.25s ease;
}
.hover-elevate::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 999;
    transition: background-color 0.25s ease;
}
.hover-elevate:hover::after {
    background-color: var(--elevate-1);
}
.hover-elevate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

html.dark-mode .hover-elevate:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.02);
}

.bg-primary-10 { background: rgba(var(--primary-rgb), 0.1); }
.text-primary-icon { color: var(--primary); }
.bg-muted { background: var(--muted); }
.bg-muted-20 { background: rgba(241,245,249,0.5); }
.bg-accent-10 { background: rgba(250,245,255,0.5); }
.text-muted-foreground { color: var(--muted-foreground) !important; }
.bg-primary-5 { background: rgba(var(--primary-rgb), 0.05); }

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 24px;
    flex-shrink: 0;
}
.icon-circle-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 28px;
    flex-shrink: 0;
}
.icon-circle-xl {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 36px;
    flex-shrink: 0;
}

.bullet-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 4px;
}

.section-padding { padding: 80px 0; }
.container-xl { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

.gradient-hero { background: linear-gradient(to left, rgba(var(--primary-rgb),0.05), rgba(var(--primary-rgb),0.02)); }
html.dark-mode .gradient-hero { background: linear-gradient(to left, rgba(var(--primary-rgb),0.08), rgba(0,0,0,0.1)); }
.gradient-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes revealUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes revealLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.4); opacity: 0; } }

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-slide-up { animation: slideUp 0.6s ease-out; }
.animate-shimmer { animation: shimmer 3s infinite; }

.feature-bullet { display: flex; align-items: flex-start; gap: 12px; }
.feature-bullet span { font-size: 18px; line-height: 1.6; }

.stat-card { text-align: center; padding: 32px 16px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--card); }
.stat-card .stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.stat-card .stat-label { color: var(--muted-foreground); font-size: 1.1rem; }

.section-title { font-size: 2.25rem; font-weight: 700; margin-bottom: 16px; color: var(--foreground); }
.section-subtitle { font-size: 1.25rem; color: var(--muted-foreground); }

@media (max-width: 768px) {
    .section-title { font-size: 1.75rem; }
    .section-subtitle { font-size: 1rem; }
}

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s cubic-bezier(.22,.61,.36,1), transform 0.65s cubic-bezier(.22,.61,.36,1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Navbar ─── */
.platform-navbar {
    background: var(--nav-bg) !important;
    border-bottom: 1px solid var(--nav-border) !important;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.platform-navbar .nav-link {
    color: var(--foreground) !important;
    font-weight: 500;
    transition: color 0.2s;
}
.platform-navbar .nav-link:hover { color: var(--primary) !important; }
.platform-navbar .navbar-toggler { color: var(--foreground); }
.platform-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280%2C128%2C128%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ─── Dark Mode Toggle Button ─── */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: rotate(20deg);
}

/* Mobile theme toggle row */
.mobile-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.mobile-theme-row span {
    font-weight: 500;
    font-size: 15px;
    color: var(--foreground);
}
.theme-toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--border);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    outline: none;
    flex-shrink: 0;
}
.theme-toggle-switch.dark { background: var(--primary); }
.theme-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s;
}
.theme-toggle-switch.dark::after { transform: translateX(-22px); }

/* ─── Offcanvas Dark Mode ─── */
.offcanvas {
    background: var(--offcanvas-bg) !important;
    color: var(--foreground) !important;
    transition: background 0.3s ease;
}
.offcanvas .nav-link { color: var(--foreground) !important; }
.offcanvas .border-bottom { border-color: var(--border) !important; }
.offcanvas-header { border-color: var(--border) !important; }
.offcanvas-header .btn-close { filter: var(--bs-btn-close-filter, none); }
html.dark-mode .offcanvas-header .btn-close { filter: invert(1); }

/* ─── Table Dark Mode ─── */
html.dark-mode .table { color: var(--foreground); border-color: var(--border); }
html.dark-mode .table-bordered th, html.dark-mode .table-bordered td { border-color: var(--border); }
html.dark-mode .table thead tr { background: var(--muted) !important; }

/* ─── Form Controls Dark Mode ─── */
html.dark-mode .form-control,
html.dark-mode .form-select {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--foreground);
}
html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus {
    background: var(--input-bg);
    border-color: var(--primary);
    color: var(--foreground);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}
html.dark-mode .form-control::placeholder { color: var(--muted-foreground); }

/* ─── Auth Pages Dark Mode ─── */
.auth-page { background: var(--auth-bg); transition: background 0.3s; }
.auth-card { background: var(--auth-card-bg); border-color: var(--border); }
.auth-card-header h5 { color: var(--foreground); }
.auth-card-header p { color: var(--muted-foreground); }
.auth-card .form-label { color: var(--foreground); }
.auth-card .form-control,
.auth-card .form-select,
.auth-card textarea.form-control { background: var(--input-bg); border-color: var(--border); color: var(--foreground); }
html.dark-mode .step-num.inactive { background: var(--border); color: var(--muted-foreground); }
html.dark-mode .step-line.inactive { background: var(--border); }
html.dark-mode .slug-prefix { background: var(--slug-prefix-bg); color: var(--muted-foreground); border-color: var(--border); }
html.dark-mode .slug-input-wrapper { border-color: var(--border); }
html.dark-mode .review-box { background: var(--review-box-bg); border-color: var(--border); }
html.dark-mode .review-label { color: var(--muted-foreground); }
html.dark-mode .review-value { color: var(--foreground); }
html.dark-mode .review-item { border-color: var(--muted); }

/* ─── Alert Dark Mode ─── */
html.dark-mode .alert-danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* ─── FAQ / Support Accordion ─── */
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item:hover { border-color: rgba(var(--primary-rgb), 0.4); }
.faq-item.open { border-color: rgba(var(--primary-rgb), 0.6); box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.08); }
.faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border: none;
    text-align: right;
    cursor: pointer;
    gap: 12px;
    color: var(--foreground);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    transition: color 0.2s;
}
.faq-btn:hover { color: var(--primary); }
.faq-item.open .faq-btn { color: var(--primary); }
.faq-chevron {
    font-size: 14px;
    color: var(--muted-foreground);
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1), color 0.2s;
    flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary); }
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.22,.61,.36,1), padding 0.3s ease;
    padding: 0 20px;
}
.faq-body.open {
    max-height: 400px;
    padding: 0 20px 18px;
}
.faq-body p { margin: 0; color: var(--muted-foreground); line-height: 1.8; font-size: 14px; }

/* ─── Pricing Toggle ─── */
.pricing-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}
.pricing-toggle-label {
    font-weight: 600;
    font-size: 15px;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s;
}
.pricing-toggle-label.active { color: var(--foreground); }
.pricing-toggle-track {
    width: 52px;
    height: 28px;
    background: var(--primary);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    border: none;
    outline: none;
    transition: background 0.3s;
}
.pricing-toggle-thumb {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s cubic-bezier(.22,.61,.36,1);
}
.pricing-toggle-track.annual .pricing-toggle-thumb { transform: translateX(-24px); }
.pricing-save-badge {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ─── Step Process (Create Store) ─── */
.steps-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-right: 24px;
}
.steps-timeline::before {
    content: '';
    position: absolute;
    right: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    border-radius: 2px;
}
.step-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
    position: relative;
    z-index: 1;
}

/* ─── Footer Dark Mode ─── */
html.dark-mode footer { background: var(--muted) !important; }
html.dark-mode footer a { color: var(--muted-foreground) !important; }
html.dark-mode footer a:hover { color: var(--primary) !important; }

/* ─── Input Group ─── */
html.dark-mode .input-group .form-control { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.15); }
html.dark-mode .input-group .form-control::placeholder { color: rgba(255,255,255,0.5); }

/* ─── Section backgrounds in dark mode ─── */
html.dark-mode section[style*="background: var(--muted)"],
html.dark-mode section.bg-muted { background: #111827 !important; }
html.dark-mode .bg-muted { background: #111827 !important; }

/* ─── Responsive ─── */
@media (max-width: 576px) {
    .section-padding { padding: 56px 0; }
    h1[style*="font-size: 3.2rem"] { font-size: 2.2rem !important; }
    h2[style*="font-size: 2.25rem"] { font-size: 1.75rem !important; }
    .stat-card .stat-value { font-size: 2rem; }
    .pricing-toggle-wrap { flex-wrap: wrap; gap: 10px; }
}

@media (max-width: 767px) {
    .hero-cta-wrap { flex-direction: column; align-items: stretch; }
    .hero-cta-wrap a { text-align: center; }
}
