@font-face {
    font-family: 'Tajawal';
    src: url('fonts/Tajawal.ttf');
}

:root {
    color-scheme: only light;
    --primary: #b8860b;
    --primary-strong: #d4af37;
    --primary-soft: rgba(212, 175, 55, 0.12);
    --accent: #f0c75d;
    --text-main: #17201a;
    --text-muted: #4b514c;
    --surface: #fffaf6;
    --surface-soft: rgba(255, 250, 246, 0.75);
    --border: #efe6d0;
    --shadow: 0 24px 48px rgba(23, 32, 26, 0.12), 0 4px 16px rgba(23, 32, 26, 0.06);
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

/* ===== Top nav ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.90));
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(6px);
}

.top-nav__inner {
    width: min(1100px, 96%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    direction: rtl;
}

.top-nav__left,
.top-nav__center,
.top-nav__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-main);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.icon-btn:focus {
    outline: none;
    box-shadow: 0 0 0 6px var(--primary-soft);
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 16px rgba(23, 32, 26, 0.06);
}

.top-nav__links {
    gap: 14px;
    display: flex;
    align-items: center;
}

.top-nav__link {
    text-decoration: none;
    font-weight: 600;
    color: var(--text-main);
    padding: 8px 10px;
    border-radius: 8px;
}

.top-nav__link:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--primary);
}

.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--primary);
}

.top-nav__brand {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
    text-decoration: none;
}

/* SIDE DRAWER */
#nav-side-btn {
    display: none;
}

.side-drawer {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    pointer-events: none;
}

.side-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(320px, 84%);
    max-width: 360px;
    background: var(--surface);
    box-shadow: 4px 0 40px rgba(23, 32, 26, 0.18);
    transform: translateX(-110%);
    transition: transform 300ms ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 2;
}

.side-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.36);
    opacity: 0;
    transition: opacity 240ms ease;
    pointer-events: auto;
    z-index: 1;
}

.side-drawer.open {
    display: block;
    pointer-events: auto;
}

.side-drawer.open .side-drawer__panel {
    transform: translateX(0);
}

.side-drawer.open .side-drawer__backdrop {
    opacity: 1;
}

.side-drawer__close {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-main);
}

.side-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.side-drawer__link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-main);
}

.side-drawer__link:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--primary);
}

@media (max-width: 700px) {
    #nav-side-btn {
        display: inline-grid;
    }

    .top-nav__center {
        display: none !important;
    }

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

/* Body & Main */
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.06), transparent 40%),
        radial-gradient(circle at bottom right, rgba(11, 88, 43, 0.03), transparent 50%),
        linear-gradient(180deg, #f9f7f2, #fffefb); */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--text-main);
    background-image: url(https://rahma-lahum.com/css/background.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

main {
    margin-top: 70px;
    width: min(960px, 100%);
    display: grid;
    gap: 32px;
}

/* Hero Card */
.hero-card {
    display: grid;
    gap: 18px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 36px clamp(24px, 5vw, 48px);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(184, 134, 11, 0.04));
    pointer-events: none;
}

.hero-card>* {
    position: relative;
    z-index: 2;
}

.hero-card h1 {
    font-size: clamp(26px, 3.4vw, 36px);
    margin: 0;
    color: var(--text-main);
    font-weight: 700;
}

.hero-card p {
    margin: 0;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 62ch;
}

.hero-card blockquote {
    margin: 12px 0 0;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
}

/* Form Card */
.form-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
}

.form-card__form {
    padding: clamp(24px, 5vw, 40px);
    display: grid;
    gap: 24px;
    background: rgba(255, 255, 255, 0.98);
}

.form-card__preview {
    background: linear-gradient(160deg,
            rgba(212, 175, 55, 0.95) 0%,
            rgba(200, 150, 36, 0.95) 35%,
            rgba(140, 100, 8, 0.92) 100%);
    color: #fff;
    padding: clamp(28px, 6vw, 48px);
    align-content: space-between;
    box-shadow: inset 0 -20px 50px rgba(0, 0, 0, 0.06);
}

.form-card__preview h2 {
    margin: 0;
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 700;
    color: #fffdfa;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.form-card__preview p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.reminder-sample {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 20px;
    display: grid;
    gap: 12px;
    border: 1px solid rgba(212, 175, 55, 0.12);
    margin-top: 20px;
}

.reminder-sample span {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.75);
}

.reminder-sample strong {
    font-size: 18px;
    line-height: 1.6;
    display: block;
    color: #fffdf8;
}

/* Form Elements */
.form-group {
    display: grid;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group textarea,
.form-group input[type="number"] {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 14px 16px;
    font-size: 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.9);
    box-shadow: 0 0 0 6px var(--primary-soft);
}

.method-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.method-card {
    flex: 1;
    min-width: 140px;
    position: relative;
}

.method-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.method-card label {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: #fffaf6;
    text-align: center;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    font-weight: 500;
    color: var(--text-main);
}

.method-card label span {
    font-size: 13px;
    color: var(--text-muted);
}

.method-card input:checked+label {
    border-color: var(--primary);
    box-shadow: 0 12px 18px rgba(184, 134, 11, 0.18);
    transform: translateY(-4px);
}

.helper-text {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.submit-btn {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: white;
    font-size: 17px;
    font-weight: 600;
    padding: 16px;
    cursor: pointer;
    box-shadow: 0 16px 26px rgba(184, 134, 11, 0.18);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px rgba(184, 134, 11, 0.28);
    filter: brightness(1.03);
}

.submit-btn:active {
    transform: translateY(0);
}

.footer-note {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.country-code {
    min-width: 110px;
    max-width: 140px;
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fffaf0, #fff6e0);
    text-align: center;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.02);
}

.hidden {
    display: none !important;
}

/* Select2 */
.select2-container--default .select2-selection--single {
    height: 44px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fffaf6;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    text-align: right;
}

/* Steps System */
.steps-indicator {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all var(--transition);
    border: 2px solid var(--border);
    font-size: 14px;
}

.step-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition);
    text-align: center;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary);
}

/* Step Content */
.step-content {
    display: block;
}

.step-content.hidden {
    display: none !important;
}

.step-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.step-header h2 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 24px;
    font-weight: 700;
}

.step-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
}

.back-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.back-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.next-btn {
    flex: 1;
}

/* Template Options */
.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.template-card {
    position: relative;
}

.template-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.template-card label {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    cursor: pointer;
    transition: all var(--transition);
    height: 100%;
}

.template-card input:checked+label {
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(184, 134, 11, 0.15);
    transform: translateY(-2px);
}

.template-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-soft), var(--border));
}

.template-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 16px;
}

.template-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Confirmation Details */
.confirmation-details {
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
}

.detail-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.detail-section h3 {
    margin: 0 0 16px 0;
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-main);
}

.detail-value {
    color: var(--text-muted);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 900px) {
    .form-card {
        grid-template-columns: 1fr;
    }

    .form-card__preview {
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

@media (max-width: 768px) {
    .steps-container {
        gap: 10px;
    }

    .steps-container::before {
        left: 30px;
        right: 30px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-label {
        font-size: 11px;
    }

    .template-options {
        grid-template-columns: 1fr;
    }

    .method-options {
        flex-direction: column;
    }

    .method-card {
        min-width: 100%;
    }

    .detail-section {
        padding: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .back-btn,
    .next-btn {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hero-card {
        padding: 28px 24px;
    }

    .country-code {
        min-width: 90px;
    }
}

@media (max-width: 480px) {
    .steps-container {
        gap: 5px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .step-label {
        font-size: 10px;
    }

    .detail-section {
        padding: 12px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-label {
        font-size: 14px;
    }

    .detail-value {
        font-size: 14px;
    }
}

/* حاوية صورة القالب */
.template-image-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-soft), var(--border));
}

.template-image-container img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-card:hover .template-image-container img {
    transform: scale(1.05);
}

/* طبقة التغطية وأيقونة المعاينة */
.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-sm);
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.preview-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
}

.preview-btn:hover {
    background: var(--primary-strong);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.4);
}

.preview-btn i {
    font-size: 16px;
}

/* نافذة المعاينة */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-modal.hidden {
    display: none;
}

.preview-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.preview-modal__content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.preview-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.preview-modal__header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
}

.preview-modal__close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal__close:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.preview-modal__body {
    flex: 1;
    padding: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-modal__body img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.preview-modal__footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
}

#select-template-btn {
    min-width: 200px;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .preview-modal__content {
        max-width: 95%;
        max-height: 95%;
        width: 95%;
    }

    .preview-modal__header {
        padding: 16px 20px;
    }

    .preview-modal__header h3 {
        font-size: 18px;
    }

    .preview-modal__footer {
        padding: 16px 20px;
    }

    .preview-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .preview-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .preview-modal {
        padding: 10px;
    }

    .preview-modal__content {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .preview-modal__header {
        padding: 12px 16px;
    }

    .preview-modal__footer {
        padding: 12px 16px;
    }

    #select-template-btn {
        min-width: 160px;
    }
}

/* Dark mode */
/* ==========================
   Dark mode — triggered by:
   <html data-theme="dark">
   ========================== */

html[data-theme="dark"] {
    /* تفعيل نظام الألوان الداكنة لتأثير الوسوم الافتراضية */
    color-scheme: only dark;
    --primary: #d4af37;
    /* ذهبي واضح */
    --primary-strong: #ffd166;
    /* ذهبي فاتح للتدرجات */
    --primary-soft: rgba(212, 175, 55, 0.08);
    --accent: #f0c75d;
    --text-main: #f6f5ef;
    /* نص فاتح */
    --text-muted: #cfc7b8;
    /* نص ثانوي فاتح */
    --surface: #07120e;
    /* سطح داكن أخضر/أسود */
    --surface-soft: rgba(7, 18, 14, 0.6);
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.4);
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition: 180ms ease;
}

/* body background — خلفية داكنة مع لمسات ذهبية خفيفة */
html[data-theme="dark"] .top-nav {
            position: fixed;
            /* ← بدل sticky */
            top: 0;
            left: 0;
            right: 0;
            z-index: 9999;
            background: linear-gradient(180deg, rgba(212, 175, 55, 0.95), rgba(212, 175, 55, 0.90));
            border-bottom: 1px solid var(--border);
            backdrop-filter: blur(6px);
}
html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.03), transparent 30%),
        radial-gradient(circle at bottom right, rgba(11, 88, 43, 0.05), transparent 45%),
        linear-gradient(180deg, #07120e 0%, #04100b 100%);
    color: var(--text-main);
}

/* البطاقات والأسطح */
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .form-card__form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    box-shadow: var(--shadow);
    color: var(--text-main);
}

/* الطبقة الزخرفية الذهبية على البطاقة */
html[data-theme="dark"] .hero-card::before {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04), rgba(184, 134, 11, 0.03));
}

/* عناوين ونصوص */
html[data-theme="dark"] .hero-card h1,
html[data-theme="dark"] .hero-card blockquote,
html[data-theme="dark"] .hero-card p,
html[data-theme="dark"] .form-card__preview h2,
html[data-theme="dark"] .form-card__preview p {
    color: var(--text-main);
}

html[data-theme="dark"] .hero-card p,
html[data-theme="dark"] .helper-text,
html[data-theme="dark"] .footer-note {
    color: var(--text-muted);
}

/* تدرج المعاينة — داكن مع ذهب لامع */
html[data-theme="dark"] .form-card__preview {
    background: linear-gradient(160deg,
            rgba(212, 175, 55, 0.95) 0%,
            rgba(180, 130, 30, 0.92) 35%,
            rgba(60, 40, 10, 0.92) 100%);
    color: #fffef8;
    box-shadow: inset 0 -20px 60px rgba(0, 0, 0, 0.6);
}

/* تامبلت للعناصر بداخل preview */
html[data-theme="dark"] .reminder-sample {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.08);
}

/* الحقول والمدخلات */
html[data-theme="dark"] .form-group input[type="text"],
html[data-theme="dark"] .form-group input[type="email"],
html[data-theme="dark"] .form-group input[type="url"],
html[data-theme="dark"] .form-group input[type="tel"],
html[data-theme="dark"] .form-group textarea,
html[data-theme="dark"] .form-group input[type="number"] {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border);
    color: var(--text-main);
    box-shadow: none;
}

html[data-theme="dark"] .form-group input::placeholder {
    color: rgba(207, 199, 184, 0.6);
}

/* حالة التركيز للحقل */
html[data-theme="dark"] .form-group input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.95);
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.06);
}

/* method cards (اختيارات الطريقة) */
html[data-theme="dark"] .method-card label {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.00));
    border: 1.5px solid var(--border);
    color: var(--text-main);
}

html[data-theme="dark"] .method-card label span {
    color: var(--text-muted);
}

html[data-theme="dark"] .method-card input:checked+label {
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.12);
    transform: translateY(-4px);
}

/* زر الإرسال */
html[data-theme="dark"] .submit-btn {
    background: linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: #04120a;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 6px 20px rgba(212, 175, 55, 0.12);
}

html[data-theme="dark"] .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 10px 30px rgba(212, 175, 55, 0.14);
    filter: brightness(1.03);
}

/* country-code */
html[data-theme="dark"] .country-code {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* select2 tweaks للـ RTL في الداكن */
html[data-theme="dark"] .select2-container--default .select2-selection--single {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.00));
    border: 1px solid var(--border);
    color: var(--text-main);
}

/* إخفاء الحدود القوية البيضاء في شاشات صغيرة أو وضع خاص */
html[data-theme="dark"] .form-card__preview {
    border-left: 1px solid rgba(255, 255, 255, 0.02);
}

/* تحسين التباين للعناصر الصغيرة */
html[data-theme="dark"] .form-group label {
    color: var(--text-main);
}

/* ظلال أخف عند الحاجة */
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .form-card {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* قواعد استجابة وتأكيدات صغيرة */
html[data-theme="dark"] .hidden {
    display: none !important;
}

/* Smooth transitions for theme switch */
html[data-theme="dark"] *,
html[data-theme="dark"] *::before,
html[data-theme="dark"] *::after {
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}