/* Dashboard Specific Styles */

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 100px 0 40px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.dashboard-title p {
    font-size: 1.125rem;
    color: #4a5568;
}

.dashboard-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Dashboard Content */
.dashboard-content {
    padding: 40px 0;
    background: #f7fafc;
    min-height: calc(100vh - 200px);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.summary-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 12px;
}

.summary-info {
    flex: 1;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

/* Dashboard Controls */
.dashboard-controls {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 16px;
}

.filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Subscriptions Section */
.subscriptions-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 40px;
}

.section-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.view-btn:hover {
    border-color: #cbd5e0;
    color: #000000;
}

.view-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Subscriptions Grid */
.subscriptions-grid {
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.subscription-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.2s ease;
}

.subscription-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.subscription-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 8px;
}

.subscription-info {
    flex: 1;
}

.subscription-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.subscription-category {
    font-size: 0.875rem;
    color: #718096;
    text-transform: capitalize;
}

.subscription-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f7fafc;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #718096;
}

.action-btn:hover {
    color: #000000;
    background: #edf2f7;
}

.edit-btn:hover {
    background: #e6fffa;
    color: #2d3748;
}

.delete-btn:hover {
    background: #fed7d7;
    color: #e53e3e;
}

.subscription-details {
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.paused {
    background: #fef5e7;
    color: #744210;
}

.status-badge.cancelled {
    background: #fed7d7;
    color: #742a2a;
}

.subscription-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.subscription-url a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.subscription-url a:hover {
    color: #000000;
}

/* Analytics Section */
.analytics-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 32px;
    margin-bottom: 40px;
}

.analytics-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.analytics-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.analytics-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.chart-placeholder {
    height: 200px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    font-size: 0.875rem;
    color: #4a5568;
    text-transform: capitalize;
}

.category-amount {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 600;
}

/* Modal Styles */
.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;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #000000;
}

.subscription-form {
    padding: 0 24px 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 80px 0 30px;
    }
    
    .dashboard-title h1 {
        font-size: 2rem;
    }
    
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-controls {
        justify-content: stretch;
    }
    
    .subscriptions-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 16px;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .subscription-card {
        padding: 16px;
    }
    
    .subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .subscription-actions {
        align-self: flex-end;
    }
}
