/* فایل CSS اصلی دورما */
:root {
    --primary: #d81b60;
    --secondary: #ec407a;
    --accent: #f48fb1;
    --light: #fce4ec;
    --dark: #ad1457;
    --success: #388e3c;
    --warning: #ffb74d;
    --danger: #e57373;
    --text: #5d4037;
    --card-bg: #fff9fb;
    --shadow: rgba(216, 27, 96, 0.2);
    --donation-color: #ff9800;
    --community-color: #2196f3;
    --header-gradient: linear-gradient(135deg, #d81b60 0%, #ec407a 100%);
    --card-gradient: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}
        /* استایل‌های چاپ جذاب */
        .print-section {
            display: none;
        }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Vazir, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: var(--text);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    overflow: hidden;
    position: relative;
}

.dorama-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath fill='%23d81b60' d='M50,10 C60,20 70,30 80,40 C90,50 95,60 95,70 C95,80 90,90 80,95 C70,100 60,95 50,90 C40,85 30,80 20,70 C10,60 5,50 10,40 C15,30 25,20 35,15 C40,12 45,10 50,10 Z'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* هدر */
.header {
    background: var(--header-gradient);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    z-index: 2;
}

.dorama-icon {
    color: #ffeb3b;
    margin: 0 5px;
}

/* کنترل‌های هدر */
.header-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 10;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.header-btn.donation {
    background: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.5);
}

.header-btn.donation:hover {
    background: rgba(255, 152, 0, 0.4);
}

.header-btn.community {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}

.header-btn.community:hover {
    background: rgba(33, 150, 243, 0.4);
}

/* نوار اطلاعات */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--light);
    border-bottom: 1px solid #f8bbd0;
    flex-wrap: wrap;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--primary);
}

/* بخش اصلی */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 600px;
    position: relative;
    z-index: 1;
}

/* پنل مخاطبین */
.contacts-panel {
    background: var(--light);
    padding: 20px;
    border-bottom: 1px solid var(--light);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-title {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    font-size: 1.2rem;
}

.panel-controls {
    display: flex;
    gap: 10px;
}

.panel-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.panel-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(216, 27, 96, 0.3);
}

.panel-btn.download {
    background: var(--community-color);
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow);
    border-color: var(--accent);
}

.contact-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--header-gradient);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
}

.completed-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--success);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.completed-check.show {
    opacity: 1;
}

.progress-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 80px;
    height: 80px;
}

.progress-ring-circle {
    fill: transparent;
    stroke: var(--success);
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.5s ease;
}

.contact-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.contact-relation {
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(216, 27, 96, 0.1);
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

.contact-tasks {
    font-size: 0.7rem;
    color: var(--text);
    margin-top: 5px;
}

.add-contact-btn {
    background: var(--header-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px var(--shadow);
}

/* پنل فعالیت‌ها */
.tasks-panel {
    background: white;
    padding: 20px;
    border-top: 1px solid var(--light);
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.task-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
    color: var(--dark);
}

.task-contact {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--primary);
}

.contact-avatar-small {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.task-description {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.task-status {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--light);
    color: var(--primary);
}

.task-actions {
    display: flex;
    gap: 5px;
}

.task-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.task-btn:hover {
    color: var(--dark);
}

.add-task-btn {
    background: var(--header-gradient);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 12px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 10px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0;
    width: 200px;
}

.add-task-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px var(--shadow);
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: var(--header-gradient);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #f8bbd0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(244, 143, 177, 0.2);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #f8bbd0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: var(--light);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(244, 143, 177, 0.2);
}

.date-input-group {
    display: flex;
    gap: 10px;
}

.date-input {
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    background: var(--light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(216, 27, 96, 0.3);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #f5e6ea;
    transform: translateY(-2px);
}

.btn-donation {
    background: var(--donation-color);
    color: white;
}

.btn-donation:hover {
    background: #ff9800;
    transform: translateY(-2px);
}

/* مودال وضعیت مخاطب */
.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.contact-details-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--header-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
}

.contact-details-completed-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--success);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-details-completed-check.show {
    opacity: 1;
}

.contact-details-progress {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 110px;
    height: 110px;
}

.contact-details-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.contact-details-relation {
    font-size: 0.9rem;
    color: var(--primary);
    background: rgba(216, 27, 96, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
}

.contact-tasks-list {
    width: 100%;
}

.contact-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
}

.contact-task-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-task-title {
    font-weight: 600;
    color: var(--dark);
}

.contact-task-status {
    font-size: 0.8rem;
    color: var(--primary);
}

.suggested-tasks {
    margin-top: 20px;
    border-top: 1px solid var(--light);
    padding-top: 15px;
}

.suggested-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.suggested-task-title {
    font-size: 0.9rem;
    color: var(--text);
}

.assign-suggested-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assign-suggested-btn:hover {
    background: var(--accent);
}

/* مودال نامه */
.letter-modal {
    max-width: 800px;
}

.letter-preview {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
    margin-bottom: 20px;
    font-family: 'B Nazanin', 'B Mitra', Tahoma, sans-serif;
    line-height: 1.8;
    text-align: justify;
}

.letter-template-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.template-option {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.template-option:hover {
    border-color: var(--primary);
}

.template-option.selected {
    border-color: var(--primary);
    background-color: rgba(216, 27, 96, 0.1);
}

.letter-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* مودال کارت عضویت */
.membership-modal .modal-content {
    max-width: 450px;
}

.membership-card-modal {
    background: var(--header-gradient);
    color: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(216, 27, 96, 0.3);
    margin-bottom: 20px;
}

.membership-header {
    margin-bottom: 20px;
}

.membership-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.membership-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.membership-body {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.membership-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.membership-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: bold;
    border: 3px solid white;
}

.membership-info {
    text-align: right;
}

.membership-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.membership-date {
    font-size: 0.9rem;
    opacity: 0.9;
}

.membership-qr {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 20px;
}

.membership-qr img {
    width: 180px;
    height: 180px;
}

.membership-footer {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 15px;
}

/* مودال راهنما */
.help-modal .modal-content {
    max-width: 700px;
}

.help-accordion {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px var(--shadow);
}

.help-item {
    border-bottom: 1px solid #f8bbd0;
}

.help-item:last-child {
    border-bottom: none;
}

.help-question {
    padding: 15px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.help-question:hover {
    background: #f9f9f9;
}

.help-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.help-item.active .help-answer {
    padding: 0 15px 15px;
    max-height: 500px;
}

.help-item.active .help-question i {
    transform: rotate(180deg);
}

.help-question i {
    transition: transform 0.3s ease;
}

/* مودال کمک مالی */
.donation-modal .modal-content {
    max-width: 600px;
}

.campaign-info {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ffcc80;
}

.campaign-title {
    color: #e65100;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.campaign-description {
    font-size: 0.9rem;
    color: #5d4037;
    line-height: 1.5;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.amount-btn {
    padding: 12px;
    background: white;
    border: 2px solid #ffcc80;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.amount-btn:hover {
    border-color: #ff9800;
    background: #fff3e0;
}

.amount-btn.selected {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

.custom-amount {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.custom-amount-input {
    flex: 1;
}

.donation-summary {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    font-weight: bold;
    color: #e65100;
    font-size: 1.2rem;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

/* مودال دعوت */
.invite-stats {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    text-align: center;
}

.invite-stat {
    flex: 1;
    padding: 10px;
}

.invite-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
}

.invite-stat-label {
    font-size: 0.8rem;
    color: var(--text);
    margin-top: 5px;
}

/* رسپانسیو */
@media (min-width: 992px) {
    .main-content {
        flex-direction: row;
    }
    
    .contacts-panel {
        flex: 1;
        border-left: 1px solid var(--light);
        border-bottom: none;
    }
    
    .tasks-panel {
        flex: 2;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .letter-template-selector {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .amount-buttons {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 767px) {
    .contacts-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .tasks-container {
        grid-template-columns: 1fr;
    }
    
    .header-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .header-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .panel-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .date-input-group {
        flex-direction: column;
    }
    
    .letter-template-selector {
        grid-template-columns: 1fr;
    }
    
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .membership-user {
        flex-direction: column;
        text-align: center;
    }
    
    .membership-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .contacts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-card {
        padding: 10px;
    }
    
    .contact-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .progress-ring {
        width: 70px;
        height: 70px;
        top: -5px;
        left: -5px;
    }
    
    .header {
        padding: 15px 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .amount-buttons {
        grid-template-columns: 1fr;
    }
}
