/**
 * Danti Digital Suite v3.0 - Frontend Stylesheet
 * Fixes theme duplicate sections on danti.ir, styles the Software Marketplace Landing Page,
 * enforces the Guest Checkout OTP Gate, and modernizes all Checkout inputs.
 */

:root {
    --dds-brand-purple: #6d28d9;
    --dds-brand-indigo: #4f46e5;
    --dds-primary: #2563eb;
    --dds-success: #16a34a;
    --dds-success-dark: #15803d;
    --dds-dark: #0f172a;
    --dds-text: #1e293b;
    --dds-muted: #64748b;
    --dds-border: #e2e8f0;
    --dds-bg-soft: #f8fafc;
}

/* ==========================================================================
   1. HIDE DUPLICATE THEME ELEMENTS ON SINGLE PRODUCT PAGE
   ========================================================================== */
body.dds-single-product-active div.product > div.summary,
body.dds-single-product-active div.product > div.woocommerce-product-gallery,
body.dds-single-product-active div.product > .woocommerce-tabs,
body.dds-single-product-active div.product > .related.products,
body.dds-single-product-active div.product > .upsells.products,
body.dds-single-product-active .wd-sticky-btn,
body.dds-single-product-active .sticky-add-to-cart,
body.dds-single-product-active .ast-sticky-add-to-cart,
body.dds-single-product-active .etheme-sticky-cart,
body.dds-single-product-active .single-product-page > .row > .col-md-6,
body.dds-single-product-active .product-images,
body.dds-single-product-active .product-summary {
    display: none !important;
}

/* Ensure our custom landing container spans full width cleanly */
.dds-pro-landing,
.dds-user-hub,
.dds-otp-card,
.dds-checkout-locked-gate,
.dds-checkout-steps-bar,
.dds-thankyou-instant-box {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    direction: rtl;
    text-align: right;
    color: var(--dds-text);
    box-sizing: border-box;
    width: 100%;
}

.dds-pro-landing *,
.dds-user-hub *,
.dds-otp-card *,
.dds-checkout-locked-gate * {
    box-sizing: border-box;
}

/* ==========================================================================
   2. SINGLE PRODUCT SOFTWARE MARKETPLACE LANDING PAGE
   ========================================================================== */
.dds-pro-landing {
    max-width: 1280px;
    margin: 16px auto 48px;
}

/* Hero Banner */
.dds-hero-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    color: #ffffff;
    padding: 32px 36px;
    border-radius: 24px;
    margin-bottom: 28px;
    box-shadow: 0 20px 40px rgba(49, 46, 129, 0.18);
    position: relative;
    overflow: hidden;
}

.dds-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.dds-badge-glow {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
}

.dds-badge-glass {
    background: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.dds-badge-emerald {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(134, 239, 172, 0.4);
    color: #86efac;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}

.dds-hero-title {
    color: #ffffff !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
}

.dds-hero-subtitle {
    color: #cbd5e1 !important;
    font-size: 15.5px !important;
    margin: 0 !important;
    line-height: 1.8 !important;
}

/* 2-Column Marketplace Layout */
.dds-marketplace-layout {
    display: grid;
    grid-template-columns: 1.85fr 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 992px) {
    .dds-marketplace-layout {
        grid-template-columns: 1fr;
    }
}

/* Preview Card & Mockup Window */
.dds-preview-card {
    background: #ffffff;
    border: 1px solid var(--dds-border);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 22px;
}

.dds-mockup-window {
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 20px;
}

.dds-mockup-topbar {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dds-mockup-dots {
    display: flex;
    gap: 6px;
}

.dds-mockup-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.dot-r { background: #ef4444; }
.dot-y { background: #f59e0b; }
.dot-g { background: #22c55e; }

.dds-mockup-address {
    background: #0f172a;
    color: #94a3b8;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 8px;
    flex: 1;
    max-width: 360px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dds-verified-shield {
    color: #38bdf8;
    font-size: 12px;
    font-weight: 700;
}

.dds-mockup-body img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
}

/* Live Demo & Admin Demo Buttons */
.dds-action-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 14px !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.dds-btn-full {
    width: 100%;
}

.dds-btn-live-demo {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #ffffff !important;
    flex: 1;
    min-width: 210px;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.25);
}

.dds-btn-live-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(109, 40, 217, 0.35);
}

.dds-btn-admin-demo {
    background: #0f172a;
    color: #ffffff !important;
    flex: 1;
    min-width: 200px;
}

.dds-btn-admin-demo:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.dds-btn-docs {
    background: #f1f5f9;
    color: #1e293b !important;
    border: 1px solid #cbd5e1;
}

.dds-credentials-strip {
    margin-top: 16px;
    background: #f5f3ff;
    border: 1px dashed #8b5cf6;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4c1d95;
    font-size: 13.5px;
}

/* 4-Tile Technical Specs Grid */
.dds-specs-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.dds-spec-tile {
    background: #ffffff;
    border: 1px solid var(--dds-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.dds-spec-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #f5f3ff;
    color: #6d28d9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dds-spec-tile span {
    display: block;
    font-size: 12.5px;
    color: var(--dds-muted);
    margin-bottom: 3px;
}

.dds-spec-tile strong {
    font-size: 14.5px;
    color: var(--dds-dark);
    font-weight: 800;
}

/* Unified Content Tabs */
.dds-tabs-container {
    background: #ffffff;
    border: 1px solid var(--dds-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.dds-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    background: #f8fafc;
    border-bottom: 1px solid var(--dds-border);
    padding: 8px 12px 0;
    gap: 8px;
}

.dds-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 20px;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 14.5px;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dds-tab-btn.active {
    color: #6d28d9;
    border-bottom-color: #6d28d9;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
}

.dds-tabs-body {
    padding: 26px;
}

.dds-prose-content {
    line-height: 1.9;
    font-size: 15px;
    color: #334155;
}

.dds-features-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.dds-feature-box-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.dds-feat-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Sticky Purchase Sidebar */
.dds-sticky-buy-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 22px;
    padding: 26px;
    position: sticky;
    top: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.dds-discount-ribbon {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 16px;
}

.dds-price-showcase {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px dashed #cbd5e1;
}

.dds-price-caption {
    display: block;
    font-size: 13px;
    color: var(--dds-muted);
    margin-bottom: 8px;
}

.dds-price-numbers {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dds-old-price {
    color: #94a3b8;
    font-size: 15px;
}

.dds-current-price {
    text-decoration: none !important;
    font-size: 28px;
    font-weight: 900;
    color: #15803d;
}

.dds-current-price span {
    font-size: 15px;
    font-weight: 700;
}

.dds-domain-box-sidebar {
    margin-bottom: 16px;
}

.dds-domain-box-sidebar label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.dds-domain-box-sidebar small {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 5px;
}

.dds-btn-buy-direct {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    padding: 16px 24px;
    font-size: 16.5px;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.3);
}

.dds-btn-buy-direct:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    transform: translateY(-2px);
}

.dds-sidebar-checklist {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

.dds-check-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--dds-dark);
}

.dds-sidebar-checklist ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dds-sidebar-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #334155;
    margin-bottom: 10px;
    line-height: 1.6;
}

.dds-tick-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.dds-Guarantee-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.dds-g-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}

.dds-g-box strong {
    display: block;
    font-size: 12.5px;
    color: #0f172a;
}

.dds-g-box span {
    font-size: 11px;
    color: #64748b;
}

.dds-consult-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    background: #f5f3ff;
    color: #6d28d9 !important;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

/* ==========================================================================
   3. CHECKOUT STRICT OTP GATE (HIDE LOWER SECTIONS WHEN NOT LOGGED IN)
   ========================================================================== */
body.dds-checkout-guest-locked form.checkout.woocommerce-checkout,
body.dds-checkout-guest-locked .woocommerce-form-coupon-toggle,
body.dds-checkout-guest-locked .woocommerce-form-login-toggle,
body.dds-checkout-guest-locked .woocommerce-info {
    display: none !important;
}

/* Checkout Progress Bar */
.dds-checkout-steps-bar {
    max-width: 760px;
    margin: 10px auto 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dds-step-node {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
}

.dds-step-node.active {
    color: #6d28d9;
}

.dds-step-node.completed {
    color: #16a34a;
}

.dds-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.dds-step-node.active .dds-step-num {
    background: #6d28d9;
    color: #ffffff;
}

.dds-step-node.completed .dds-step-num {
    background: #dcfce7;
    color: #15803d;
}

.dds-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 14px;
}

.dds-step-line.active {
    background: #16a34a;
}

/* Locked Guest Checkout Gate Card */
.dds-checkout-locked-gate {
    max-width: 580px;
    margin: 0 auto 48px;
}

.dds-gate-cart-preview {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
}

.dds-gate-cart-head {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 12px;
}

.dds-gate-product-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dds-gate-product-row img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.dds-gate-prod-title {
    flex: 1;
}

.dds-gate-prod-title strong {
    display: block;
    font-size: 16px;
    color: #0f172a;
}

.dds-gate-prod-title span {
    font-size: 12.5px;
    color: #16a34a;
    font-weight: 600;
}

.dds-gate-prod-price {
    font-size: 17px;
    font-weight: 900;
    color: #6d28d9;
}

/* ==========================================================================
   4. LOGGED-IN CHECKOUT FORM MODERNIZATION (FIX BROKEN PILL INPUTS)
   ========================================================================== */
body.dds-checkout-page .woocommerce-additional-fields,
body.dds-checkout-page #order_comments_field {
    display: none !important;
}

body.dds-checkout-page form.checkout.woocommerce-checkout {
    background: transparent !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

body.dds-checkout-page .woocommerce-billing-fields,
body.dds-checkout-page #order_review {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 26px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05) !important;
}

body.dds-checkout-page .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
}

body.dds-checkout-page .woocommerce-billing-fields label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
}

body.dds-checkout-page .woocommerce-billing-fields input.input-text,
.dds-input,
.dds-domain-field,
.dds-otp-card input[type="tel"],
.dds-otp-card input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    padding: 10px 16px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

body.dds-checkout-page .woocommerce-billing-fields input.input-text:focus,
.dds-input:focus {
    background-color: #ffffff !important;
    border-color: #6d28d9 !important;
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.12) !important;
    outline: none !important;
}

body.dds-checkout-page .dds-ltr-field input.input-text {
    direction: ltr !important;
    text-align: left !important;
}

body.dds-checkout-page #place_order {
    width: 100% !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    padding: 16px 24px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.28) !important;
    cursor: pointer !important;
}

/* ==========================================================================
   5. OTP CARD, FAQ, CHANGELOG & USER DOWNLOADS HUB
   ========================================================================== */
.dds-otp-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dds-otp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.dds-otp-shield-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f5f3ff;
    color: #6d28d9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dds-otp-title {
    margin: 0 0 5px 0 !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.dds-otp-subtitle {
    margin: 0 !important;
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
}

.dds-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin: 12px 0 8px;
}

.dds-btn-primary {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #ffffff !important;
    margin-top: 14px;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.25);
}

.dds-btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    margin-top: 14px;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.dds-code-input {
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    letter-spacing: 8px;
}

.dds-otp-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 13px;
}

.dds-link-btn {
    background: none;
    border: none;
    color: #6d28d9;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
}

.dds-otp-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 14px;
}

.dds-otp-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.dds-otp-alert.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Changelog & FAQ inside Tabs */
.dds-changelog-timeline {
    border-right: 3px solid #6d28d9;
    padding-right: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dds-changelog-item {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}

.dds-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}

.dds-faq-question {
    width: 100%;
    background: #f8fafc;
    border: none;
    padding: 16px 20px;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.dds-faq-answer {
    padding: 16px 20px;
    background: #ffffff;
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    border-top: 1px solid #e2e8f0;
}

/* Customer Downloads Hub */
.dds-hub-header {
    background: linear-gradient(135deg, #1e1b4b, #4c1d95);
    color: #ffffff;
    padding: 28px;
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.dds-hub-welcome h2 {
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    font-size: 22px !important;
}

.dds-hub-welcome p {
    color: #cbd5e1;
    margin: 0;
    font-size: 14px;
}

.dds-hub-stats {
    display: flex;
    gap: 12px;
}

.dds-stat-chip {
    background: rgba(255, 255, 255, 0.14);
    padding: 12px 18px;
    border-radius: 14px;
    text-align: center;
}

.dds-stat-chip span {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
}

.dds-stat-chip strong {
    font-size: 16px;
    color: #ffffff;
}

.dds-download-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dds-dl-card-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.dds-dl-product-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dds-dl-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.dds-dl-files-box {
    margin-top: 16px;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dds-btn-download {
    background: #16a34a;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
}

.dds-dl-license-bar {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dds-dl-license-bar {
        grid-template-columns: 1fr;
    }
    .dds-specs-grid-4 {
        grid-template-columns: 1fr;
    }
}

.dds-lic-copy-group,
.dds-domain-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dds-lic-code {
    background: #0f172a;
    color: #38bdf8;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    flex: 1;
    text-align: center;
}

.dds-copy-btn {
    background: #e2e8f0;
    color: #0f172a;
    border: none;
    padding: 9px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
}

.dds-thankyou-instant-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 28px;
    text-align: center;
}


/* ==========================================================================
   6. SPLIT-SCREEN SAAS LOGIN PAGE & OVERRIDE DEFAULT MY-ACCOUNT
   ========================================================================== */
body.dds-myaccount-guest #customer_login,
body.dds-myaccount-guest form.woocommerce-form-login,
body.dds-myaccount-guest form.woocommerce-form-register,
body.dds-myaccount-logged-in .woocommerce-MyAccount-navigation {
    display: none !important;
}

body.dds-myaccount-logged-in .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dds-split-auth-wrapper {
    max-width: 1120px;
    margin: 24px auto 56px;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

.dds-split-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

@media (max-width: 960px) {
    .dds-split-auth-grid {
        grid-template-columns: 1fr;
    }
}

.dds-split-form-col {
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dds-split-form-col .dds-otp-card {
    box-shadow: none;
    border: none;
    padding: 8px;
    width: 100%;
}

.dds-split-info-col {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
    color: #ffffff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dds-auth-promo-badge {
    display: inline-block;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.15);
    color: #e9d5ff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    margin-bottom: 16px;
}

.dds-split-info-col h2 {
    color: #ffffff !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1.5 !important;
    margin: 0 0 12px 0 !important;
}

.dds-split-info-col p {
    color: #cbd5e1 !important;
    font-size: 14.5px !important;
    line-height: 1.8 !important;
    margin: 0 0 26px 0 !important;
}

.dds-auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dds-auth-feat-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dds-af-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #22c55e;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.dds-auth-feat-item strong {
    display: block;
    font-size: 14.5px;
    color: #ffffff;
    margin-bottom: 3px;
}

.dds-auth-feat-item span {
    font-size: 12.5px;
    color: #cbd5e1;
}

/* ==========================================================================
   7. SAAS CUSTOMER PORTAL (SIDEBAR + TABS + TICKETS + HOST INSTALL)
   ========================================================================== */
.dds-saas-portal {
    max-width: 1280px;
    margin: 20px auto 56px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    direction: rtl;
}

@media (max-width: 992px) {
    .dds-saas-portal {
        grid-template-columns: 1fr;
    }
}

.dds-portal-sidebar {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 22px;
    padding: 22px 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 24px;
}

.dds-user-profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.dds-avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
}

.dds-u-name {
    display: block;
    font-size: 15.5px;
    color: #0f172a;
    margin-bottom: 3px;
}

.dds-u-phone {
    font-size: 13px;
    color: #64748b;
}

.dds-portal-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dds-pnav-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 13px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 14.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    text-align: right;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dds-pnav-btn:hover {
    background: #f8fafc;
    color: #6d28d9;
}

.dds-pnav-btn.active {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.24);
}

.dds-nav-count {
    margin-right: auto;
    background: rgba(100, 116, 139, 0.14);
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
}

.dds-pnav-btn.active .dds-nav-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.dds-nav-badge-alert {
    margin-right: auto;
    background: #ef4444;
    color: #ffffff;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
}

.dds-pnav-logout {
    color: #dc2626 !important;
    margin-top: 8px;
}

/* Portal Main Area */
.dds-portal-welcome-banner {
    background: linear-gradient(135deg, #1e1b4b, #4c1d95);
    color: #ffffff;
    padding: 28px 32px;
    border-radius: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.dds-portal-welcome-banner h2 {
    color: #ffffff !important;
    font-size: 21px !important;
    margin: 0 0 8px 0 !important;
}

.dds-portal-welcome-banner p {
    color: #cbd5e1 !important;
    font-size: 14px !important;
    margin: 0 !important;
    max-width: 680px;
    line-height: 1.7;
}

.dds-btn-glass-action {
    background: #22c55e;
    color: #ffffff !important;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 800;
}

.dds-portal-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dds-portal-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dds-pstat-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dds-pstat-card:hover {
    transform: translateY(-2px);
    border-color: #6d28d9;
}

.dds-pstat-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.dds-pstat-val {
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.dds-overview-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .dds-overview-quick-grid {
        grid-template-columns: 1fr;
    }
}

.dds-portal-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.dds-pcard-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.dds-pcard-head h3 {
    margin: 0 !important;
    font-size: 16.5px !important;
}

.dds-mini-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.dds-mini-item-row:last-child {
    border-bottom: none;
}

.dds-pane-header {
    margin-bottom: 22px;
}

.dds-pane-header h2 {
    margin: 0 0 6px 0 !important;
    font-size: 22px !important;
    color: #0f172a !important;
}

.dds-pane-header p {
    margin: 0 !important;
    color: #64748b;
    font-size: 14px;
}

/* Modern Forms inside Portal (Host Install & Tickets) */
.dds-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .dds-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.dds-textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 14.5px !important;
}

.dds-install-history-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.dds-admin-delivery-note {
    margin-top: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 16px;
    color: #166534;
    font-size: 13.5px;
}

/* Ticket Cards & Two-Way Chat Bubbles */
.dds-ticket-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    margin-bottom: 14px;
    overflow: hidden;
}

.dds-ticket-head-row {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    cursor: pointer;
}

.dds-tk-id {
    background: #f1f5f9;
    color: #475569;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: bold;
    margin-left: 8px;
}

.dds-tk-subj {
    font-size: 16px;
    color: #0f172a;
    margin-left: 10px;
}

.dds-tk-dept {
    font-size: 12.5px;
    color: #64748b;
}

.dds-ticket-thread-box {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 22px;
}

.dds-chat-messages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.dds-chat-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    max-width: 85%;
    line-height: 1.8;
    font-size: 14px;
}

.dds-chat-bubble.user-bubble {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    align-self: flex-start;
}

.dds-chat-bubble.admin-bubble {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    align-self: flex-end;
}

.dds-bubble-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.2);
}

.dds-clean-table {
    width: 100%;
    border-collapse: collapse;
}

.dds-clean-table th,
.dds-clean-table td {
    padding: 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
}


/* ==========================================================================
   8. V4.1 INVOICE CARDS, RETRY PAYMENT & CLEAN INSTALL HISTORY
   ========================================================================== */
.dds-nav-badge-warn {
    margin-right: auto;
    background: #f59e0b;
    color: #ffffff;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
}

.dds-install-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dds-install-info-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dds-code-chip {
    background: #1e1b4b;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 800;
}

.dds-install-prod-title {
    font-size: 15.5px;
    color: #0f172a;
}

.dds-domain-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
}

.dds-panel-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
}

.dds-install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Rich Invoices List */
.dds-invoices-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dds-invoice-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dds-invoice-card.unpaid-invoice {
    border-color: #fcd34d;
}

.dds-invoice-header {
    background: #f8fafc;
    padding: 16px 22px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.dds-inv-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.dds-inv-num {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.dds-inv-date,
.dds-inv-trace {
    font-size: 13px;
    color: #64748b;
}

.dds-inv-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
}

.dds-inv-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.dds-inv-badge.unpaid {
    background: #fef3c7;
    color: #b45309;
}

.dds-invoice-items {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dds-inv-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}

.dds-inv-product-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.dds-inv-prod-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dds-inv-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.dds-inv-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #f5f3ff;
    color: #6d28d9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
}

.dds-inv-prod-details h4 {
    margin: 0 0 6px 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

.dds-inv-prod-details h4 a {
    color: #0f172a !important;
    text-decoration: none !important;
}

.dds-inv-subspecs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: #64748b;
}

.dds-inv-prod-price {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.dds-invoice-footer {
    background: #fcfcfd;
    border-top: 1px solid #f1f5f9;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.dds-inv-total span {
    font-size: 13.5px;
    color: #64748b;
    margin-left: 8px;
}

.dds-inv-total strong {
    font-size: 19px;
    font-weight: 900;
    color: #15803d;
}

.dds-btn-pay-retry {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 12px !important;
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.dds-btn-pay-retry:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    transform: translateY(-1px);
}
