.tr-dp-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    padding: 12px;
    width: 320px;              /* عرض بیشتر برای dropdownها */
    direction: rtl;
    font-family: Tahoma, sans-serif;
    margin-top: 5px;
}

/* ═══ هدر با dropdown سال و ماه ═══ */
.tr-dp-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tr-dp-prev,
.tr-dp-next,
.tr-dp-jump {
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #555;
    font-weight: bold;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.tr-dp-prev:hover,
.tr-dp-next:hover,
.tr-dp-jump:hover {
    background: #667eea;
    color: #fff;
}

.tr-dp-jump {
    background: #e8eaf6;
    color: #5b6dd8;
    font-size: 14px;
}

/* ═══ Dropdown سال و ماه ═══ */
.tr-dp-year-select,
.tr-dp-month-select {
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: border-color .2s;
    height: 32px;
}

.tr-dp-year-select {
    width: 78px;
    font-weight: bold;
    direction: ltr;
    text-align: center;
}

.tr-dp-month-select {
    flex: 1;
    min-width: 0;
    font-weight: bold;
}

.tr-dp-year-select:focus,
.tr-dp-month-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,.15);
}

.tr-dp-year-select:hover,
.tr-dp-month-select:hover {
    border-color: #667eea;
}

/* ═══ روزهای هفته ═══ */
.tr-dp-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #999;
    text-align: center;
}

/* ═══ شبکه روزها ═══ */
.tr-dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.tr-dp-day,
.tr-dp-empty {
    padding: 7px 0;
    text-align: center;
    font-size: 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    height: 32px;
    box-sizing: border-box;
}

.tr-dp-day {
    cursor: pointer;
    color: #333;
    transition: background .15s, color .15s;
    font-weight: 500;
}

.tr-dp-day:hover {
    background: #eef;
    color: #667eea;
}

.tr-dp-day.selected {
    background: #667eea;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(102,126,234,.4);
}

/* ═══ فوتر ═══ */
.tr-dp-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.tr-dp-today,
.tr-dp-clear {
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.tr-dp-today:hover {
    background: #667eea;
    color: #fff;
}

.tr-dp-clear {
    background: #fdecec;
    color: #c0392b;
}

.tr-dp-clear:hover {
    background: #e74c3c;
    color: #fff;
}

/* ═══ ریسپانسیو برای موبایل ═══ */
@media (max-width: 400px) {
    .tr-dp-popup {
        width: 290px;
        padding: 10px;
    }
    .tr-dp-year-select { width: 70px; }
    .tr-dp-prev,
    .tr-dp-next,
    .tr-dp-jump { width: 26px; height: 30px; font-size: 14px; }
}