body {
    background: #e0e0e0;
    font-family: 'Vazir';
}
    /*کانتینر بالا======================================================*/
.top_container {
    position: fixed;
    width: 600px !important;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #e0e0e0;
    z-index: 100;
    padding: 10px 30px;
    border-radius: 0px;
    box-shadow: 0 10px 10px -10px rgba(0,0,0,0.3);
}
    /* ردیف دکمه‌های اصلی ======================================================*/
.tab-row {
    display: flex;
    justify-content: center;
    margin: 0 0 0px 0;
    gap: 20px;
}
.tab-btn {
    position: relative;
    width: 110px;
    padding: 5px;
    background: #ccc;
    color: rgb(0, 0, 0);
    border:1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Vazir' !important;
}
.tab-btn:hover {
    background: #bbb;
}
.tab-btn:focus {
    border-color: #008000;
}
.tab-btn.active {
    border: 1px solid #008000;
}
/*badge ======================================================*/
.badge {
    position: absolute;
    top: -15px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 61, 0, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 61, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 61, 0, 0); }
}
    /*کانتینر اصلی======================================================*/
.container{
    position: relative;
    width: 600px !important;
    margin: 10px auto 10px auto;
    padding: 10px 30px 10px 30px;
    border-radius: 15px;
    background: #e0e0e0;
    box-shadow:
        7px 7px 7px #c5c5c5,
        -7px -7px 7px #c5c5c5;
}
    /*عنوان======================================================*/
.title {          
    text-align: center;
    margin: 0px auto 0px auto;         /* top right bottom left*/
    color: #333;
    font-size: 24px !important;
    font-weight: bold;
}
    /*خط*/ 
hr {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 10px 0 10px 0;
}
    /*ردیف مربوط به لیبل ها و فیلدها======================================================*/
.rows {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
}
.rows_detail {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    align-items: center;
    width: 100%;
}
.rows_detail img{
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
}
    /*لیبل ها======================================================*/
.label_ {
    width: 120px;
    flex-shrink: 0;
    color: #333;
    font-size: 16px;
    text-align: right;
}
.label_detail {
    display: flex;          /* استفاده از فلکس برای تراز عمودی آیکون و متن */
    align-items: center;    /* تراز عمودی دقیق در مرکز */
    gap: 8px;               /* فاصله افقی بین آیکون و متن */
    color: #555;
    font-size: 18px;
    word-break: break-word; /* جلوگیری از بیرون زدن متن‌های طولانی */
    min-width: 0; 
}
/* تراز کردن محتوای ستون سمت راست به سمت چپ (مرکز کانتینر) در حالت RTL */
.rows_detail > .label_detail:first-of-type {
    justify-content: flex-end;
}

/* تراز کردن محتوای ستون سمت چپ به سمت راست (مرکز کانتینر) در حالت RTL */
.rows_detail > .label_detail:last-of-type {
    justify-content: flex-start;
}
    /*فیلد ها======================================================*/
.field_,
.container input,
.container select,
.container textarea {
    height: 50px !important;
    width: 100% !important;
    margin: 5px;
    padding: 0 15px;
    border-radius: 15px;
    font-size: 16px;
    outline: none;
    border: 1px solid #008000 !important;
    box-sizing: border-box;
    text-align: right;
    direction: rtl !important;
    background: #e0e0e0;
    color: #333;
}

.container textarea {
    min-height: 100px !important;
    max-height: 200px !important;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
}
.desc_single{
    background: #ececec;
    padding:20px 20px 0px 20px;
    border-radius:15px;
}
    /*محتوا و اطلاعات آگهی ========================================*/
.content {
    flex: 1;
    min-width: 0;
    text-align: center;
    overflow-wrap: break-word;    /* شکستن کلمات بلند */
    word-break: break-word;       /* شکستن کلمات (پشتیبانی بهتر) */
    hyphens: auto;                /* خط تیره برای کلمات انگلیسی */
    display: -webkit-box;         /* برای محدود کردن خطوط */
    -line-clamp: 2;               /* حداکثر ۲ خط */
    -webkit-box-orient: vertical;
    overflow: hidden;             /* متن اضافی مخفی */
    text-decoration:none;
}
    /*متن ها ========================================*/
.text_large {
    font-size: 20px;
    color: #333;
    margin: 0 0 0 5px;
}
.text_medium {
    font-size: 18px;
    color: #555;
    margin: 0 0 0 5px;
}
.text_normal {
    font-size: 16px;
    color: #666;
    margin: 0 0 0 5px;
}
.text_small {
    font-size: 14px;
    color: #777;
    margin: 0 0 0 5px;
}
.text_tiny {
    font-size: 12px;
    color: #888;
    margin: 0 0 0 5px;
}
.text_deleted {
    background: #f8d7da;
    color: #FF0000;
    border-radius: 0px;
    font-size: 12px;
    padding: auto 5px;
    margin: 0 0 0 5px; 
}
    /*ایکن و متن     ======================================================*/
/*.icon_text {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    justify-content:none;
    padding: 0 150px 0 0;
    gap: 150px; 
}*/
/*img{
    width: 24px !important;
    height: 24px !important;
}*/
    /*دکمه ها    ======================================================*/
.button_box {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    justify-content:center;
    gap: 15px; 
}
.button_single {
    width: 50px !important;
    height: 50px !important;
    background: #008000;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 
        4px 4px 8px rgba(0,0,0,0.1),
        -4px -4px 8px rgba(255,255,255,0.8);
    transition: all 0.2s;
}
.button_single:hover {
    transform: scale(1.05);
}
.button_single:disabled { 
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.button_single img {
    width: 28px !important;
    height: 28px !important;
    filter: brightness(0) invert(1);
}
    /*پیام‌های toast======================================================*/
#toast-container {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
}

/* استایل عمومی برای هر پیام */
.toast-message {
    display: flex;
    justify-content: space-between;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    padding: 10px 10px;
    border-radius: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* استایل دکمه ضربدر */
.toast-close-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}
/* افکت هاور روی دکمه */
.toast-close-btn:hover {opacity: 1;}

.toast-success { background: #d4edda; color: #008000; border: 1px solid #28a745; }
.toast-info { background: #fff3cd; color: #856404; border: 1px solid #ffc824; }
.toast-error { background: #f8d7da; color: #FF0000; border: 1px solid #dc3545; }
    /* checkbox ======================================================*/
.custom_checkbox {
    display: flex;
    align-items: center; /* وسط‌چینی عمودی */
    justify-content: flex-start; /* می‌تونی center بزاری اگه بخوای کلش وسط چین بشه */
    gap: 20px; /* فاصله بین چک‌باکس و متن */
    margin: 0 125px 0 0;
    cursor: pointer;
}
.custom_checkbox input[type="checkbox"]{
    display: none;
}
.custom_checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid #008000;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    cursor: pointer;
}
.custom_checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #008000;
    border-color: #008000;
}
.custom_checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
    /* fixed warning */
.warning{
    min-height: 30px !important;
    height: auto;
    width: 100% !important;
    margin: 5px;
    padding: 5px auto 5px auto;
    border-radius: 15px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    text-align: center;
    direction: rtl !important;
    color: #856404; 
    background-color: #fff3cd; 
    border: 1px solid #ffc824; 
}

    /*  پاپ اپ حذف ======================================================*/
#disableModal.logout-overlay,
#restoreModal.logout-overlay,
#permanentDeleteModal.logout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s;
    z-index: 9999;
}
    /* وقتی مودال فعال می‌شود */
#disableModal.active,
#restoreModal.active,
#permanentDeleteModal.active {
    opacity: 1;
    visibility: visible;
}
    /* جعبه مودال */
#disableModal .logout-popup,
#restoreModal .logout-popup,
#permanentDeleteModal .logout-popup {
    background: #ffffff;
    width: 320px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: popupShow .35s ease-out;
}
    /* ردیف دکمه‌ها */
.btn-row {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
    
}
    /* دکمه لغو */
.cancel-btn {
    flex: 1;
    padding: 10px;
    background: #008000;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Vazir' !important;
}
.cancel-btn:hover {
    background: #0b5200;
}
    /* دکمه حذف */
.delete-btn {
    flex: 1;
    padding: 10px;
    background: #ccc;
    color:black;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    border: #008000;
    border-style: solid;
    border-width: 1px;
    font-family: 'Vazir' !important;
}
.delete-btn:hover {
    background: #bbb;
}

    /* ============================ MOBILE ============================ */
@media (max-width: 768px) {
    .container{
        width: calc(100% - 10px) !important;
        max-width: 100% !important;
        margin: 0px auto !important;
        padding: 10px 5px 10px 5px;
        border-radius: 0px;
        box-shadow: none;
    }
    .title {          
        font-size: 18px;
        font-weight:100;
    }
    .rows {
        grid-template-columns: 110px 1fr;
        width: 98% ;
    }
    .tab-row {
        gap: 5px;
    }
    .button_box{
        gap: 10px;
        flex-wrap: wrap;   /* اگر جا کم شد، دکمه‌ها نترکند */
    }
    .desc_single{
        background: #ececec;
        width: 100%;
        margin: auto 5px;
        padding:10px 10px 0px 10px;
        border-radius:0px;
    }
        /* checkbox ======================================================*/
    .custom_checkbox {
        margin: 0 115px 0 0;
    }

#disableModal .logout-popup,
#restoreModal .logout-popup,
#permanentDeleteModal .logout-popup {
        width: 100%;
        margin-bottom: 60px;
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
        animation: mobileSlideUp .25s ease-out;
}


}

@keyframes popupShow {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes mobileSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}