:root {
    --cdj-bg: #f3f7fb;
    --cdj-surface: rgba(255, 255, 255, 0.88);
    --cdj-surface-solid: #ffffff;
    --cdj-border: rgba(15, 23, 42, 0.08);
    --cdj-border-strong: rgba(37, 99, 235, 0.18);
    --cdj-text: #0f172a;
    --cdj-text-soft: #475569;
    --cdj-text-muted: #64748b;
    --cdj-primary: #2563eb;
    --cdj-primary-2: #1d4ed8;
    --cdj-primary-soft: #dbeafe;
    --cdj-success: #16a34a;
    --cdj-dark: #0f172a;
    --cdj-teal: #0f766e;
    --cdj-instagram: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%);
    --cdj-radius-xs: 12px;
    --cdj-radius-sm: 16px;
    --cdj-radius-md: 22px;
    --cdj-radius-lg: 28px;
    --cdj-shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
    --cdj-shadow-md: 0 18px 45px rgba(15, 23, 42, 0.09);
    --cdj-shadow-lg: 0 26px 60px rgba(15, 23, 42, 0.14);
    --cdj-transition: all 0.28s ease;
}

.cdj-form-shell,
.cdj-business-page,
.cdj-single-page {
    direction: rtl;
    font-family: inherit;
    box-sizing: border-box;
    color: var(--cdj-text);
}

.cdj-form-shell *,
.cdj-business-page *,
.cdj-single-page * {
    box-sizing: border-box;
}

/* =========================
   FORM
========================= */
.cdj-form-shell {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 28%),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.08), transparent 30%),
        var(--cdj-surface-solid);
    border: 1px solid var(--cdj-border);
    border-radius: var(--cdj-radius-lg);
    box-shadow: var(--cdj-shadow-md);
    overflow: hidden;
}

.cdj-form-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
}

.cdj-card-form {
    position: relative;
    z-index: 2;
}

.cdj-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.cdj-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cdj-field-full {
    grid-column: 1 / -1;
}

.cdj-field label {
    font-size: 14px;
    font-weight: 800;
    color: var(--cdj-text);
    padding-right: 2px;
}

.cdj-field input,
.cdj-field textarea,
.cdj-search-form input,
.cdj-idea-form textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--cdj-text);
    background: rgba(255,255,255,0.95);
    outline: none;
    transition: var(--cdj-transition);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.6);
}

.cdj-field textarea,
.cdj-idea-form textarea {
    resize: vertical;
    min-height: 120px;
}

.cdj-field input::placeholder,
.cdj-field textarea::placeholder,
.cdj-search-form input::placeholder,
.cdj-idea-form textarea::placeholder {
    color: rgba(100, 116, 139, 0.75);
}

.cdj-field input:hover,
.cdj-field textarea:hover,
.cdj-search-form input:hover,
.cdj-idea-form textarea:hover {
    border-color: rgba(37, 99, 235, 0.22);
}

.cdj-field input:focus,
.cdj-field textarea:focus,
.cdj-search-form input:focus,
.cdj-idea-form textarea:focus {
    border-color: var(--cdj-primary);
    background: #fff;
    box-shadow:
        0 0 0 5px rgba(37, 99, 235, 0.10),
        0 12px 24px rgba(37, 99, 235, 0.07);
}

/* =========================
   BUTTONS
========================= */
.cdj-submit-btn,
.cdj-card-btn,
.cdj-back-btn,
.cdj-phone-btn,
.cdj-search-form button,
.cdj-site-btn,
.cdj-instagram-btn,
.cdj-idea-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 15px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: var(--cdj-transition);
    position: relative;
    overflow: hidden;
}

.cdj-submit-btn::before,
.cdj-card-btn::before,
.cdj-back-btn::before,
.cdj-phone-btn::before,
.cdj-search-form button::before,
.cdj-site-btn::before,
.cdj-instagram-btn::before,
.cdj-idea-form button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0));
    opacity: 0;
    transition: var(--cdj-transition);
}

.cdj-submit-btn:hover::before,
.cdj-card-btn:hover::before,
.cdj-back-btn:hover::before,
.cdj-phone-btn:hover::before,
.cdj-search-form button:hover::before,
.cdj-site-btn:hover::before,
.cdj-instagram-btn:hover::before,
.cdj-idea-form button:hover::before {
    opacity: 1;
}

.cdj-submit-btn:hover,
.cdj-card-btn:hover,
.cdj-back-btn:hover,
.cdj-phone-btn:hover,
.cdj-search-form button:hover,
.cdj-site-btn:hover,
.cdj-instagram-btn:hover,
.cdj-idea-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.cdj-submit-btn {
    width: 100%;
    margin-top: 22px;
    background: linear-gradient(135deg, var(--cdj-primary) 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

/* =========================
   FORM MESSAGE
========================= */
.cdj-form-message {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    font-weight: 700;
}

.cdj-form-message.success {
    color: #15803d;
}

.cdj-form-message.error {
    color: #dc2626;
}

/* =========================
   POPUP
========================= */
.cdj-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(6px);
}

.cdj-popup.active {
    display: flex;
}

.cdj-popup-box {
    position: relative;
    width: min(430px, 100%);
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 26px;
    padding: 34px 26px;
    text-align: center;
    box-shadow: var(--cdj-shadow-lg);
    animation: cdjPopupIn 0.28s ease;
}

.cdj-popup-title {
    margin-bottom: 10px;
    color: var(--cdj-text);
    font-size: 22px;
    font-weight: 900;
}

.cdj-popup-box p {
    margin: 0;
    color: var(--cdj-text-soft);
    font-size: 14px;
    line-height: 2;
}

.cdj-popup-close {
    position: absolute;
    top: 10px;
    left: 12px;
    border: none;
    background: #f1f5f9;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    transition: var(--cdj-transition);
}

.cdj-popup-close:hover {
    background: #e2e8f0;
    color: var(--cdj-text);
    transform: rotate(90deg);
}

@keyframes cdjPopupIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   BUSINESS PAGE
========================= */
.cdj-business-page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px 12px;
}

.cdj-search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--cdj-border);
    border-radius: 22px;
    box-shadow: var(--cdj-shadow-sm);
    backdrop-filter: blur(10px);
}

.cdj-search-form input {
    flex: 1;
    min-height: 52px;
}

.cdj-search-form button {
    min-width: 120px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

/* =========================
   CARDS GRID
========================= */
.cdj-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cdj-card {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    border: 1px solid var(--cdj-border);
    border-radius: 26px;
    box-shadow: var(--cdj-shadow-sm);
    padding: 18px;
    transition: var(--cdj-transition);
    min-height: 210px;
    overflow: hidden;
}

.cdj-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 45%);
    pointer-events: none;
}

.cdj-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cdj-shadow-md);
    border-color: rgba(37, 99, 235, 0.14);
}

.cdj-card-image {
    position: relative;
    z-index: 2;
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #eff6ff 55%, #f8fafc);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.cdj-card-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
}

.cdj-card-avatar-placeholder,
.cdj-single-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.cdj-card-avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 22px;
    font-size: 44px;
}

.cdj-single-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    font-size: 42px;
}

.cdj-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: right;
}

.cdj-card h3 {
    margin: 0 0 8px;
    color: var(--cdj-text);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.7;
}

.cdj-card-job {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--cdj-primary-2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.cdj-card-intro {
    margin-bottom: 16px;
    color: var(--cdj-text-soft);
    font-size: 13px;
    line-height: 2;
}

.cdj-card-intro span {
    display: block;
    margin-bottom: 4px;
    color: var(--cdj-text);
    font-weight: 900;
}

.cdj-card-intro p {
    margin: 0;
}

.cdj-card-btn {
    margin-top: auto;
    width: fit-content;
    min-width: 138px;
    background: linear-gradient(135deg, var(--cdj-primary) 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.20);
}

/* =========================
   PAGINATION
========================= */
.cdj-pagination {
    margin: 34px 0;
    text-align: center;
}

.cdj-pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cdj-pagination a,
.cdj-pagination span {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255,255,255,0.92);
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    transition: var(--cdj-transition);
}

.cdj-pagination a:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.18);
    color: var(--cdj-primary);
}

.cdj-pagination .current {
    background: linear-gradient(135deg, var(--cdj-primary), #3b82f6);
    border-color: var(--cdj-primary);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.cdj-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: var(--cdj-text-muted);
    text-align: center;
    font-size: 14px;
    box-shadow: var(--cdj-shadow-sm);
}

/* =========================
   SINGLE PAGE
========================= */
.cdj-single-page {
    max-width: 1020px;
    margin: 0 auto;
    padding: 32px 14px;
}

.cdj-single-card,
.cdj-single-ideas,
.cdj-ideas-section {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    border: 1px solid var(--cdj-border);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--cdj-shadow-md);
}

.cdj-single-top {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 28px;
    align-items: center;
}

.cdj-single-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    height: 210px;
    border-radius: 30px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff 55%, #f8fafc);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 18px 36px rgba(37, 99, 235, 0.08);
}

.cdj-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cdj-single-info h1 {
    margin: 0 0 10px;
    color: var(--cdj-text);
    font-size: 34px;
    font-weight: 950;
    line-height: 1.6;
}

.cdj-single-job {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--cdj-primary-2);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.cdj-phone-btn {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.20);
}

.cdj-single-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
}

.cdj-site-btn {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.18);
}

.cdj-instagram-btn {
    background: var(--cdj-instagram);
    color: #fff;
    box-shadow: 0 14px 28px rgba(221, 42, 123, 0.20);
}

/* اصلاح اختصاصی دکمه‌های صفحه تکی */
.cdj-single-links .cdj-phone-btn,
.cdj-single-links .cdj-site-btn,
.cdj-single-links .cdj-instagram-btn {
    font-size: 18px;
    font-weight: 500;
    padding: 12px 24px;
    min-width: 160px;
    text-align: center;
}

.cdj-single-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.cdj-single-section h2,
.cdj-single-ideas h2,
.cdj-ideas-section h2 {
    margin: 0 0 14px;
    color: var(--cdj-text);
    font-size: 21px;
    font-weight: 950;
    line-height: 1.7;
}

.cdj-single-section p {
    margin: 0;
    color: var(--cdj-text-soft);
    font-size: 15px;
    line-height: 2.25;
}

.cdj-single-actions {
    margin-top: 30px;
    text-align: center;
}

.cdj-back-btn {
    background: linear-gradient(135deg, #0f172a, #334155);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

/* =========================
   IDEAS
========================= */
.cdj-single-ideas {
    margin-top: 24px;
}

.cdj-idea-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cdj-idea-form button {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--cdj-primary), #3b82f6);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.cdj-approved-ideas {
    margin-top: 30px;
}

.cdj-ideas-section {
    margin-top: 36px;
}

.cdj-ideas-list {
    display: grid;
    gap: 14px;
}

.cdj-idea-item {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
    transition: var(--cdj-transition);
}

.cdj-idea-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

.cdj-idea-author {
    margin-bottom: 8px;
    color: var(--cdj-text);
    font-size: 14px;
    font-weight: 900;
}

.cdj-idea-author a {
    color: var(--cdj-primary-2);
    text-decoration: none;
}

.cdj-idea-author a:hover {
    text-decoration: underline;
}

.cdj-idea-text,
.cdj-idea-text p {
    margin: 0;
    color: var(--cdj-text-soft);
    font-size: 14px;
    line-height: 2.1;
}

/* =========================
   CREDIT
========================= */
.cdj-credit {
    margin: 26px auto 0;
    text-align: center;
    color: rgba(100, 116, 139, 0.86);
    font-size: 12px;
}

.cdj-credit a {
    color: rgba(37, 99, 235, 0.92);
    text-decoration: none;
    font-weight: 700;
}

.cdj-credit a:hover {
    text-decoration: underline;
}

/* =========================
   ADMIN
========================= */
.cdj-admin-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.cdj-admin-box textarea,
.cdj-admin-box input {
    margin-bottom: 10px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
    .cdj-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cdj-single-top {
        grid-template-columns: 180px 1fr;
        gap: 22px;
    }

    .cdj-single-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 900px) {
    .cdj-single-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cdj-single-image {
        margin: 0 auto;
    }

    .cdj-single-links {
        justify-content: center;
    }

    .cdj-single-info h1 {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .cdj-form-shell {
        padding: 18px;
        border-radius: 22px;
    }

    .cdj-form-grid,
    .cdj-cards-grid {
        grid-template-columns: 1fr;
    }

    .cdj-search-form {
        flex-direction: column;
        padding: 14px;
        border-radius: 18px;
    }

    .cdj-search-form button {
        width: 100%;
    }

    .cdj-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }

    .cdj-card-body {
        text-align: center;
    }

    .cdj-card-job,
    .cdj-card-btn {
        margin-right: auto;
        margin-left: auto;
    }

    .cdj-card-image {
        margin: 0 auto;
        width: 150px;
        height: 150px;
        flex-basis: 150px;
    }

    .cdj-card-image img {
        width: 150px;
        height: 150px;
    }

    .cdj-single-card,
    .cdj-single-ideas,
    .cdj-ideas-section {
        padding: 20px;
        border-radius: 22px;
    }

    .cdj-single-info h1 {
        font-size: 24px;
    }

    .cdj-single-image {
        width: 155px;
        height: 155px;
        border-radius: 24px;
    }

    .cdj-submit-btn,
    .cdj-card-btn,
    .cdj-back-btn,
    .cdj-idea-form button {
        width: 100%;
    }

    .cdj-single-links {
        flex-direction: column;
        align-items: center;
    }

    .cdj-single-links .cdj-phone-btn,
    .cdj-single-links .cdj-site-btn,
    .cdj-single-links .cdj-instagram-btn {
        width: 100%;
        max-width: 300px;
    }

    .cdj-idea-form button {
        align-self: stretch;
    }
}

.cdj-site-btn-disabled,
.cdj-instagram-btn-disabled{
    opacity: .7;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(15%);
}
