/**
 * Arbaeen Manager Plugin Styles
 * File: assets/css/style.css
 */

/* فونت فارسی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* متغیرهای رنگ */
:root {
    --primary-color: #10b981;
    --secondary-color: #3b82f6;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
}

/* کانتینر اصلی */
.arbaeen-dashboard,
.arbaeen-record-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

/* کارت‌ها */
.arbaeen-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.arbaeen-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 20px 0;
}

/* Grid آمار */
.arbaeen-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.arbaeen-stat-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue {
    background: #dbeafe;
}

.stat-icon.green {
    background: #d1fae5;
}

.stat-icon.purple {
    background: #e9d5ff;
}

.stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.stat-icon.blue .dashicons {
    color: #2563eb;
}

.stat-icon.green .dashicons {
    color: #059669;
}

.stat-icon.purple .dashicons {
    color: #7c3aed;
}

.stat-content h3 {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0 0 4px 0;
    font-weight: 400;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

/* Grid اربعین‌ها */
.arbaeen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.arbaeen-item {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.arbaeen-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.arbaeen-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 12px 0;
}

.arbaeen-item p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0 0 16px 0;
}

.arbaeen-conditions {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.arbaeen-conditions strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.arbaeen-conditions ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.arbaeen-conditions li {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

/* لیست اربعین‌های کاربر */
.arbaeen-user-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.arbaeen-user-item {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.arbaeen-user-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.arbaeen-user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.arbaeen-user-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 8px 0;
}

.arbaeen-date {
    font-size: 14px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.arbaeen-progress-badge {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.progress-number {
    font-size: 18px;
}

/* نوار پیشرفت */
.arbaeen-progress-bar-wrapper {
    margin-bottom: 16px;
}

.arbaeen-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.arbaeen-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.arbaeen-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* دکمه‌ها */
.arbaeen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.arbaeen-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.arbaeen-btn-primary {
    background: var(--primary-color);
    color: white;
}

.arbaeen-btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.arbaeen-btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.arbaeen-btn-secondary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.arbaeen-btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
}

.arbaeen-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.arbaeen-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
}

.arbaeen-btn-small:hover {
    background: var(--gray-200);
}

/* پیام‌های خالی */
.arbaeen-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.arbaeen-empty .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.arbaeen-empty p {
    font-size: 16px;
    margin: 0;
}

/* فرم ثبت گزارش */
.arbaeen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.arbaeen-back-btn {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.arbaeen-back-btn:hover {
    color: #1d4ed8;
}

.arbaeen-form-title {
    font-size: 18px;
    color: var(--gray-700);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.arbaeen-form-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.arbaeen-form-item {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.arbaeen-form-item:last-child {
    border-bottom: none;
}

.arbaeen-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    text-align: right;
}

/* دکمه‌های کیفیت */
.arbaeen-quality-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.arbaeen-quality-btn {
    padding: 10px 20px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.arbaeen-quality-btn:hover {
    border-color: var(--primary-color);
}

.arbaeen-quality-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.arbaeen-quality-btn.not-done.active {
    background: #ef4444;
    border-color: #ef4444;
}

.arbaeen-quality-btn.weak.active {
    background: #f59e0b;
    border-color: #f59e0b;
}

.arbaeen-quality-btn.medium.active {
    background: #eab308;
    border-color: #eab308;
}

.arbaeen-quality-btn.good.active {
    background: #10b981;
    border-color: #10b981;
}

/* ورودی‌ها */
.arbaeen-input,
.arbaeen-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.arbaeen-input:focus,
.arbaeen-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* جدول */
.arbaeen-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

.arbaeen-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.arbaeen-table thead {
    background: var(--gray-50);
}

.arbaeen-table th {
    padding: 12px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.arbaeen-table td {
    padding: 12px;
    text-align: right;
    font-size: 13px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}

.arbaeen-table tbody tr:hover {
    background: var(--gray-50);
}

/* بج‌ها */
.arbaeen-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-orange {
    background: #fed7aa;
    color: #9a3412;
}

.badge-yellow {
    background: #fef3c7;
    color: #92400e;
}

.badge-green {
    background: #d1fae5;
    color: #065f46;
}

.percentage-value {
    color: var(--primary-color);
    font-size: 14px;
}

/* نمودار */
.arbaeen-chart-wrapper {
    margin-top: 32px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.arbaeen-chart-wrapper h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 20px 0;
}

/* اکشن‌های ثبت گزارش */
.arbaeen-record-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 24px;
}

.next-day-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 4px 0;
}

.next-day-info p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
}

.arbaeen-completed {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 12px;
}

.arbaeen-completed .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #059669;
    margin-bottom: 12px;
}

.arbaeen-completed p {
    font-size: 18px;
    font-weight: 600;
    color: #065f46;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .arbaeen-dashboard,
    .arbaeen-record-page {
        padding: 12px;
    }
    
    .arbaeen-card {
        padding: 16px;
    }
    
    .arbaeen-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .arbaeen-grid {
        grid-template-columns: 1fr;
    }
    
    .arbaeen-user-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .arbaeen-quality-buttons {
        flex-direction: column;
    }
    
    .arbaeen-quality-btn {
        width: 100%;
    }
    
    .arbaeen-record-actions {
        flex-direction: column;
        gap: 16px;
    }
    
    .arbaeen-btn-large {
        width: 100%;
    }
    
    .arbaeen-table-wrapper {
        font-size: 12px;
    }
    
    .arbaeen-table th,
    .arbaeen-table td {
        padding: 8px;
        font-size: 11px;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.arbaeen-card {
    animation: fadeIn 0.5s ease;
}

.arbaeen-stat-card {
    animation: fadeIn 0.5s ease;
}

/* Loading State */
.arbaeen-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.arbaeen-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* پرینت */
@media print {
    .arbaeen-btn,
    .arbaeen-record-actions,
    .arbaeen-back-btn {
        display: none !important;
    }
    
    .arbaeen-card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}