/* متغیرهای رنگی اختصاصی پروژه */
:root {
    --primary-color: #00b39b;
    --primary-hover: #009c87;
    --bg-light: #f8fafc;
    --card-light: #ffffff;
    --border-light: #ececec;
    --text-main-light: #232323;
    --text-muted-light: #777777;

    /* حالت تاریک پیش‌فرض */
    --bg-dark: #161616;
    --card-dark: #232323;
    --border-dark: #2f2f2f;
    --text-main-dark: #ffffff;
    --text-muted-dark: #aaaaaa;
}

/* ساختار کلی صفحه داشبورد */
.dashboard-page {
    padding: 24px;
    font-family: inherit;
}

/* هدر اصلی داشبورد */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.dashboard-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-title i {
    color: var(--primary-color);
}

.dashboard-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted-light);
}

.dashboard-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px 16px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.dashboard-date-badge i {
    color: var(--primary-color);
}

/* گرید کارت‌های آمار سریع */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.stat-card__label {
    display: block;
    font-size: 13px;
    color: var(--text-muted-light);
    margin-bottom: 6px;
}

.stat-card__value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main-light);
    line-height: 1;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-card--primary .stat-card__icon { background: rgba(0, 179, 155, 0.1); color: var(--primary-color); }
.stat-card--warning .stat-card__icon { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.stat-card--info .stat-card__icon { background: rgba(52, 152, 219, 0.1); color: #3498db; }
.stat-card--danger .stat-card__icon { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }

/* گرید دو ستونه اصلی */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 24px;
}

.dashboard-main-grid__content,
.dashboard-main-grid__sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ویجت‌ها */
.dashboard-widget {
    background: var(--card-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.dashboard-widget__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-widget__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-widget__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dashboard-widget__dot--danger { background: #e74c3c; }
.dashboard-widget__dot--info { background: #3498db; }
.dashboard-widget__dot--warning { background: #f39c12; }
.dashboard-widget__dot--purple { background: #8e44ad; }

.dashboard-widget__link {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.dashboard-widget__link:hover {
    color: var(--primary-hover);
}

.dashboard-widget__body {
    padding: 20px;
}

.dashboard-widget__placeholder {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: var(--text-muted-light);
    gap: 10px;
    font-size: 13px;
}

.dashboard-widget__placeholder i {
    font-size: 30px;
    color: #ccc;
}

/* ==========================================
   پشتیبانی از تم تاریک بر اساس [data-theme="dark"] یا کلاس .dark روی body
   ========================================== */
[data-theme="dark"] .dashboard-page,
.dark .dashboard-page {
    background-color: var(--bg-dark);
}

[data-theme="dark"] .dashboard-title,
.dark .dashboard-title {
    color: var(--text-main-dark);
}

[data-theme="dark"] .dashboard-subtitle,
.dark .dashboard-subtitle {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .dashboard-date-badge,
.dark .dashboard-date-badge {
    background: var(--card-dark);
    border-color: var(--border-dark);
    color: var(--text-main-dark);
}

[data-theme="dark"] .stat-card,
.dark .stat-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .stat-card__value,
.dark .stat-card__value {
    color: var(--text-main-dark);
}

[data-theme="dark"] .stat-card__label,
.dark .stat-card__label {
    color: var(--text-muted-dark);
}

[data-theme="dark"] .dashboard-widget,
.dark .dashboard-widget {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .dashboard-widget__head,
.dark .dashboard-widget__head {
    border-bottom-color: var(--border-dark);
}

[data-theme="dark"] .dashboard-widget__title,
.dark .dashboard-widget__title {
    color: var(--text-main-dark);
}

[data-theme="dark"] .dashboard-widget__placeholder,
.dark .dashboard-widget__placeholder {
    color: var(--text-muted-dark);
}

/* ریسپانسیو کامپوننت‌ها */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}



/*ویجت مدیریت پرونده ها*/
.deadline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
}

.deadline-item--expired {
    border-right-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.deadline-item__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.deadline-item__case {
    font-size: 12px;
    color: var(--text-muted-light);
}

.deadline-item__meta {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.deadline-item__date {
    font-size: 12px;
    font-weight: 600;
}

.deadline-item__btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.deadline-item__btn:hover {
    transform: scale(1.2);
    color: #27ae60;
}

[data-theme="dark"] .deadline-item {
    background: rgba(255, 255, 255, 0.03);
}
.dashboard-widget__footer {
    margin-top: 15px;
    text-align: center;
}

.load-more-btn {
    background: transparent;
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-style: solid;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* برای انیمیشن لودینگ ساده */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.bi-arrow-repeat {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/*پایان مدیریت پرونده ها*/
/* ==========================================================================
   ویجت جلسات و برنامه‌های آینده
   ========================================================================== */

.calendar-event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-event-item {
    background-color: var(--widget-item-bg, #fcfcfc);
    border: 1px solid var(--border-color, #eaeaea);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* نمایش خط وضعیت رنگی در کنار کارت */
.calendar-event-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary-color);
}

/* وضعیت‌های مختلف رویداد */
.calendar-event-item.is-confirmed::before {
    background-color: #00b39b; /* تایید شده */
}

.calendar-event-item.is-cancelled::before {
    background-color: #e63946; /* لغو شده */
}

.calendar-event-item.is-completed::before {
    background-color: #2a9d8f; /* انجام شده */
}

.calendar-event-item.is-no-show::before {
    background-color: #e9c46a; /* عدم حضور */
}

.calendar-event-item.is-scheduled::before {
    background-color: #3a86c8; /* زمان‌بندی‌شده */
}

.calendar-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ساختار بدنه و هدر آیتم */
.calendar-event-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.calendar-event-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color, #232323);
    margin: 0;
    line-height: 1.6;
}

/* نشان‌ها (Badges) */
.calendar-event-item__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.calendar-event-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.calendar-event-badge--type {
    background-color: rgba(0, 179, 155, 0.1);
    color: var(--primary-color);
}

.calendar-event-badge--status {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-muted, #777);
}

.calendar-event-badge--method {
    background-color: rgba(58, 134, 200, 0.1);
    color: #3a86c8;
}

/* اطلاعات زمانی و پرونده */
.calendar-event-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted, #666);
    align-items: center;
}

.calendar-event-item__time,
.calendar-event-item__case {
    display: flex;
    align-items: center;
    gap: 6px;
}

.calendar-event-item__time-separator {
    color: var(--text-muted);
    font-size: 11px;
    margin: 0 2px;
}

.calendar-event-item__case--empty {
    opacity: 0.7;
    font-style: italic;
}

/* توضیحات رویداد */
.calendar-event-item__description {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted, #555);
    border-top: 1px dashed var(--border-color, #eee);
    padding-top: 8px;
    margin-top: 4px;
}

/* پشتیبانی از تم تاریک */
[data-theme="dark"] .calendar-event-item {
    background-color: #1e1e1e;
    border-color: #2d2d2d;
}

[data-theme="dark"] .calendar-event-item__title {
    color: #eaeaea;
}

[data-theme="dark"] .calendar-event-badge--status {
    background-color: rgba(255, 255, 255, 0.08);
    color: #bbb;
}

[data-theme="dark"] .calendar-event-item__description {
    border-color: #2d2d2d;
}


/* ==========================================================================
   ویجت رزروهای مشاوره
   ========================================================================== */
/* ==========================================================================
   ویجت رزروهای مشاوره (اصلاح‌شده با چینش افقی آیکون‌ها)
   ========================================================================== */

.consultation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consultation-item {
    background: var(--widget-item-bg, #f9f9f9);
    border: 1px solid var(--border-color, #eee);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consultation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.consultation-item__name {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-color, #232323);
}

.consultation-item__sub {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted, #777);
}

/* قرارگیری آیکون‌ها و متن‌ها در یک خط */
.consultation-item__phone,
.consultation-item__type {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* فاصله بین آیکون و متن */
}

.consultation-item__phone i,
.consultation-item__type i {
    font-size: 14px;
    color: var(--primary-color);
}

.consultation-item__date {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.consultation-item__date-label {
    font-size: 10px;
    color: var(--text-muted, #888);
    margin-bottom: 2px;
}

.consultation-item__date-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] .consultation-item {
    background: #1e1e1e;
    border-color: #2d2d2d;
}



/* ==========================================================================
   ویجت نظرات در انتظار تایید
   ========================================================================== */
/* ==========================================================================
   ویجت نظرات در انتظار تایید (اصلاح‌شده با حذف ایمیل و محدودیت تک‌خطی)
   ========================================================================== */

.comment-widget-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-widget-item {
    background: var(--widget-item-bg, #f9f9f9);
    border: 1px solid var(--border-color, #eee);
    border-radius: 12px;
    padding: 12px 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-widget-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.comment-widget-item__header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--border-color, #eee);
    padding-bottom: 8px;
}

.comment-widget-item__user {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.comment-widget-item__author,
.comment-widget-item__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.comment-widget-item__author {
    font-weight: 700;
    color: var(--text-color, #232323);
}

.comment-widget-item__author i {
    font-size: 14px;
    color: var(--primary-color, #00b39b);
}

.comment-widget-item__date {
    color: var(--text-muted, #888);
    font-size: 11px;
}

.comment-widget-item__date i {
    color: var(--primary-color, #00b39b);
}

.comment-widget-item__body {
    overflow: hidden;
}

/* محدود کردن متن نظر به دقیقا یک خط با سه نقطه */
.comment-widget-item__text {
    margin: 0;
    font-size: 13px;
    color: var(--text-color, #444);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* حالت تم تاریک */
[data-theme="dark"] .comment-widget-item {
    background: #1e1e1e;
    border-color: #2d2d2d;
}

[data-theme="dark"] .comment-widget-item__header {
    border-color: #2d2d2d;
}

[data-theme="dark"] .comment-widget-item__author {
    color: #e0e0e0;
}

[data-theme="dark"] .comment-widget-item__text {
    color: #ccc;
}
/* ==========================================================================
   نمودار بازدید پروفایل وکیل
   ========================================================================== */

.profile-views-chart {
    position: relative;
    width: 100%;
    height: 260px;
    padding: 8px 0 0;
}

.profile-views-chart canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
:root {
    --primary-color: #00b39b;
    --primary-color-rgb: 0, 179, 155;
    --text-color: #232323;
    --border-color: #e9e9e9;
}
.profile-views-chart__empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-color, #e7e7e7);
    border-radius: 14px;
    background: var(--widget-item-bg, #fafafa);
}

[data-theme="dark"] .profile-views-chart__empty {
    background: #1e1e1e;
    border-color: #2d2d2d;
}


[data-theme="dark"] {
    --primary-color: #00b39b;
    --primary-color-rgb: 0, 179, 155;
    --text-color: #e6e6e6;
    --border-color: #2d2d2d;
}


.lawyer-sms-status-wrap {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.lawyer-sms-status__hint {
    margin: 0;
    font-size: 0.75rem;
    color: #858585;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.5;
}

.lawyer-sms-status__hint i {
    font-size: 0.8rem;
    color: #f59e0b;
}

.lawyer-sms-status__ticket-link {
    color: #d97706;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.lawyer-sms-status__ticket-link:hover {
    color: #b45309;
}
.lawyer-sms-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.lawyer-sms-status__icon {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
}

.lawyer-sms-status__label {
    opacity: 0.85;
}

.lawyer-sms-status__value {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.lawyer-sms-status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* حالت فعال */
.lawyer-sms-status.is-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.lawyer-sms-status.is-active .lawyer-sms-status__dot {
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* حالت غیرفعال */
.lawyer-sms-status.is-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.lawyer-sms-status.is-inactive .lawyer-sms-status__dot {
    background-color: #ef4444;
}
