/* Acceptance Form styles */
.af-form {
    max-width: 820px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-family: inherit
}

.af-form h3 {
    margin: 0 0 12px;
    font-size: 18px
}

.af-status {
    margin-bottom: 10px;
    display: block;
    min-height: 20px
}

.af-success {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 8px 10px;
    border-radius: 8px
}

.af-error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 10px;
    border-radius: 8px
}

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

@media (max-width:640px) {
    .af-grid {
        grid-template-columns: 1fr
    }
}

.af-col-span-2 {
    grid-column: span 2
}

.af-field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.af-field input[type="text"],
.af-field input[type="tel"],
.af-field input[type="date"],
.af-field input[type="file"],
.af-field textarea {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    font-family: inherit
}

.af-field textarea {
    resize: vertical
}

.af-hint {
    font-size: 12px;
    color: #6b7280
}

.af-required {
    color: #dc2626
}

.af-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center
}

/* .af-actions button{padding:10px 14px;border:0;border-radius:8px;cursor:pointer;background:#111827;color:#fff} */

/* Date picker input with icon */
/* .af-date-wrap{position:relative;display:flex;align-items:center}
.af-date-wrap input{flex:1;padding-right:38px}
.af-date-btn{position:absolute;right:8px;border:1px solid #e5e7eb;background:#f9fafb;border-radius:6px;padding:6px 8px;cursor:pointer}
.af-date-btn:focus{outline:2px solid #3b82f6} */

/* Gregorian date input + quick buttons */
/* .af-date-wrap{display:flex;gap:6px;align-items:center}
#af-admit-date{flex:1;padding:8px;border:1px solid #d1d5db;border-radius:6px}
.af-date-btn{padding:8px 10px;border:1px solid #d1d5db;background:#f9fafb;border-radius:6px;cursor:pointer}
.af-date-btn:hover{background:#e5e7eb} */

/* نمایش نتیجه به صورت جدول دو ستونه شکیل */
#af-lookup .af-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

#af-lookup .af-kv-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

#af-lookup .af-kv-key {
    background: #f6f7f9;
    color: #5a6470;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
}

#af-lookup .af-kv-val {
    background: #ffffff;
    color: #101318;
    font-weight: 700;
    padding: 10px 12px;
    border: 1px solid #e6e8ee;
    border-radius: 10px;
}

/* از اسکرین‌های بزرگ‌تر به بعد، کلید و مقدار کنار هم بشن */
@media (min-width: 640px) {
    #af-lookup .af-kv-row {
        display: grid;
        grid-template-columns: 200px 1fr;
        /* عرض ستون عنوان */
        align-items: center;
    }

    #af-lookup .af-kv-key,
    #af-lookup .af-kv-val {
        margin: 0;
        /* هم‌تراز شون */
    }
}

/* وضعیت پیام موفق/خطا قبلاً اگر نداشتی، برای تمایز: */
#af-lookup .af-status {
    display: block;
    margin-bottom: 8px;
    font-size: .95rem;
}

#af-lookup .af-status.af-error {
    color: #b00020;
}

#af-lookup .af-status.af-success {
    color: #0a7d32;
}

/* دکمه‌ها */
#af-lookup .af-actions {
    display: flex;
    gap: .5rem;
}

/* --- Buttons: only inside My List & its modals --- */

/* پایه دکمه‌ها در باکس لیست */
.af-mylist-wrap .button,
.af-mylist-wrap a.button,
.af-mylist-wrap .tablenav .button {
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border: 1px solid #cbd5e1 !important;
    /* slate-300 */
    background: #ffffff !important;
    color: #1f2937 !important;
    /* gray-800 */
    box-shadow: none !important;
}

/* هاور عمومی */
.af-mylist-wrap .button:hover,
.af-mylist-wrap a.button:hover,
.af-mylist-wrap .tablenav .button:hover {
    background: #f3f4f6 !important;
    /* gray-100 */
    border-color: #94a3b8 !important;
    /* slate-400 */
    color: #111827 !important;
    /* gray-900 */
}

/* دکمه‌های ستون عملیات – هم اندازه و فاصلۀ منطقی */
.af-mylist-wrap .af-actions .button {
    margin-left: 6px !important;
    min-width: 74px;
    text-align: center;
}

/* دکمۀ مشاهده فایل در ستون "فایل" */
.af-mylist-wrap td a.button.button-small {
    padding: 6px 10px !important;
    border-radius: 6px !important;
}

/* دکمۀ حذف – قرمز مینیمال */
.af-mylist-wrap .af-actions .af-mydel {
    background: #fee2e2 !important;
    /* red-100 */
    border-color: #fca5a5 !important;
    /* red-300 */
    color: #b91c1c !important;
    /* red-700 */
}

.af-mylist-wrap .af-actions .af-mydel:hover {
    background: #fecaca !important;
    /* red-200 */
    border-color: #f87171 !important;
    /* red-400 */
    color: #991b1b !important;
    /* red-800 */
}

/* صفحه‌بندی */
.af-mylist-wrap .tablenav .button {
    min-width: 42px;
}

/* دکمه‌های داخل مودال‌ها (نمایش/ویرایش) */
.af-modal .button,
.af-modal a.button {
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    box-shadow: none !important;
}

.af-modal .button:hover,
.af-modal a.button:hover {
    background: #f3f4f6 !important;
    border-color: #94a3b8 !important;
}

/* دکمۀ اصلی ذخیره داخل مودال (اگر کلاس button-primary دارد) */
.af-modal .button-primary {
    background: #1d4ed8 !important;
    /* آبی مینیمال */
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.af-modal .button-primary:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
}