/* Advanced Tax Returns List Styles */
.dmp-advanced-returns-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Cairo', Arial, sans-serif;
    direction: rtl;
}

.dmp-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.dmp-header-section h2 {
    color: #2c5282;
    margin: 0;
    font-size: 1.8rem;
}

/* Tabs Styling */
.dmp-tabs-nav {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 30px;
    overflow-x: auto;
    gap: 4px;
}

.dmp-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
}

.dmp-tab-btn:hover {
    background: #e2e8f0;
    color: #2c5282;
    transform: translateY(-1px);
}

.dmp-tab-btn.active {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.dmp-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.dmp-tab-btn.active .dmp-count-badge {
    background: rgba(255, 255, 255, 0.3);
}

.dmp-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.dmp-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Files Accordion */
.dmp-files-accordion {
    margin-bottom: 20px;
}
.dmp-accordion-item {
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dmp-accordion-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.dmp-accordion-header {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: right;
}

.dmp-accordion-header:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.dmp-accordion-header.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
}

.dmp-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-number {
    font-weight: 700;
    font-size: 1.1rem;
}

.file-user {
    color: #6c757d;
    font-size: 0.9rem;
}

.dmp-accordion-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.returns-count {
    background: linear-gradient(135deg, #e3f2fd, #90caf9);
    color: #1976d2;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.dmp-accordion-content {
    display: none;
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.dmp-accordion-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 1000px; opacity: 1; }
}

/* Year Accordion */
.dmp-years-accordion {
    margin-right: 20px;
}

.dmp-year-accordion-item {
    margin-bottom: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fafbfc;
}

.dmp-year-accordion-header {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f1f3f4, #e8eaed);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: right;
}

.dmp-year-accordion-header:hover {
    background: linear-gradient(135deg, #e8eaed, #dadce0);
    transform: translateX(-2px);
}

.dmp-year-accordion-header.active {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #ef6c00;
}

.dmp-year-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-label {
    font-weight: 600;
    color: #495057;
}

.dmp-year-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-count {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(133, 100, 4, 0.2);
}

.dmp-year-accordion-content {
    display: none;
    padding: 15px;
    background: #fafbfc;
}

.dmp-year-accordion-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Returns Grid */
.dmp-returns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding-top: 10px;
}

.dmp-return-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dmp-return-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3182ce, #2c5282);
}

.dmp-return-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #3182ce;
}

.dmp-return-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f7fafc;
}

.dmp-return-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c5282;
    margin: 0;
    line-height: 1.3;
}

.dmp-return-status {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-not-prepared {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    color: #c53030;
    border: 1px solid #feb2b2;
}

.status-prepared-review {
    background: linear-gradient(135deg, #fffaf0, #fef5e7);
    color: #c05621;
    border: 1px solid #f6ad55;
}

.status-reviewed-sent {
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    color: #276749;
    border: 1px solid #9ae6b4;
}

.dmp-return-details {
    margin-bottom: 18px;
}

.dmp-return-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dmp-return-info span {
    font-size: 0.9rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dmp-return-info i {
    color: #718096;
    width: 16px;
    text-align: center;
}

.dmp-return-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dmp-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.dmp-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.dmp-btn:hover::before {
    left: 100%;
}

.dmp-btn-primary {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    box-shadow: 0 2px 8px rgba(49, 130, 206, 0.3);
}

.dmp-btn-primary:hover {
    background: linear-gradient(135deg, #2c5282, #1a365d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

.dmp-btn-secondary {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    color: #4a5568;
    box-shadow: 0 2px 6px rgba(113, 128, 150, 0.2);
}

.dmp-btn-secondary:hover {
    background: linear-gradient(135deg, #cbd5e0, #a0aec0);
    color: #2d3748;
    transform: translateY(-2px);
}

.dmp-btn-error {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.2);
}

.dmp-btn-error:hover {
    background: linear-gradient(135deg, #feb2b2, #fc8181);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.dmp-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.dmp-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e0;
    opacity: 0.7;
}

.dmp-empty-state h3 {
    margin: 0 0 12px 0;
    color: #4a5568;
    font-size: 1.4rem;
}

.dmp-empty-state p {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

/* Loading States */
.dmp-loading {
    text-align: center;
    padding: 40px;
    color: #718096;
}

.dmp-loading i {
    font-size: 2rem;
    color: #3182ce;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dmp-advanced-returns-container {
        padding: 15px;
    }
    
    .dmp-header-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dmp-tabs-nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .dmp-tab-btn {
        justify-content: flex-start;
        min-width: auto;
    }
    
    .dmp-returns-grid {
        grid-template-columns: 1fr;
    }
    
    .dmp-years-accordion {
        margin-right: 0;
    }
    
    .dmp-accordion-header {
        padding: 15px;
    }
    
    .dmp-file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .dmp-return-card {
        padding: 15px;
    }
    
    .dmp-return-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dmp-advanced-returns-container {
        padding: 10px;
    }
    
    .dmp-header-section h2 {
        font-size: 1.4rem;
    }
    
    .dmp-tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .dmp-return-card {
        padding: 12px;
    }
    
    .dmp-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .dmp-advanced-returns-container {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    .dmp-tabs-nav,
    .dmp-return-actions,
    .dmp-header-section button {
        display: none !important;
    }
    
    .dmp-tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .dmp-return-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 20px;
    }
}
