﻿
.payments-page {
    font-size: .875rem;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Modern Card Styles */
.modern-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    .modern-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

/* Filter Panel */
/* Filter Panel - Современный нейтральный дизайн */
.filter-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 20px;
    z-index: 20;
}

    /* Input fields styling */
    .filter-panel .mud-input-root,
    .filter-panel .mud-select {
        background: white;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.12);
        transition: all 0.3s ease;
    }

        .filter-panel .mud-input-root:hover,
        .filter-panel .mud-select:hover {
            border-color: rgba(0, 0, 0, 0.2);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        }

        .filter-panel .mud-input-root:focus-within,
        .filter-panel .mud-select:focus-within {
            border-color: #2196F3;
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        }

        .filter-panel .mud-input-root input,
        .filter-panel .mud-select-input {
            color: #212529 !important;
            font-weight: 500;
        }

    .filter-panel .mud-input-label,
    .filter-panel .mud-select-label {
        color: #6c757d !important;
        font-weight: 500;
    }

    .filter-panel .mud-icon-root {
        color: #6c757d !important;
    }

    /* Button styling */
    .filter-panel .mud-button {
        border-radius: 12px;
        text-transform: none;
        font-weight: 500;
        transition: all 0.3s ease;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.12);
        color: #495057;
    }

        .filter-panel .mud-button:hover {
            background: #f8f9fa;
            border-color: rgba(0, 0, 0, 0.2);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }

/* Quick Range Buttons */
.quick-range-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #495057;
    border-radius: 12px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 40px;
}

    .quick-range-btn:hover {
        background: #f8f9fa;
        border-color: rgba(0, 0, 0, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .quick-range-btn.active {
        background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
        color: white;
        font-weight: 600;
        border-color: transparent;
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    }

/* Active Filters Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-chip {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

    .filter-chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
        background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    }

    .filter-chip .mud-icon-root {
        color: white !important;
        font-size: 16px;
    }



/* Responsive */
@media (max-width: 768px) {
    .filter-panel {
        padding: 16px;
        border-radius: 16px;
        position: relative;
        top: 0;
    }

    .quick-range-btn {
        padding: 6px 12px;
        font-size: 0.875rem;
        min-height: 36px;
    }

    .filter-chip {
        padding: 6px 12px;
        font-size: 0.813rem;
    }

    .filter-panel .action-btn,
    .filter-panel .mud-icon-button {
        min-height: 36px;
        height: 36px;
        width: 36px;
    }
}

/* Focus styles for accessibility */
.filter-panel .mud-input-root:focus-within,
.filter-panel .mud-select:focus-within,
.filter-panel .mud-button:focus,
.filter-panel .mud-icon-button:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-panel {
    animation: fadeIn 0.3s ease-out;
}

    /* Select dropdown styling */
    .filter-panel .mud-select-input::placeholder {
        color: #adb5bd;
        font-weight: 400;
    }

    .filter-panel .mud-input-root::placeholder {
        color: #adb5bd;
        font-weight: 400;
    }

/* Tabs */
.modern-tabs {
    margin-bottom: 24px;
}

    .modern-tabs .mud-tabs-toolbar {
        background: linear-gradient(145deg, #ffffff, #f8f9fa);
        border-radius: 16px;
        padding: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

    .modern-tabs .mud-tab {
        border-radius: 12px;
        text-transform: none;
        font-weight: 500;
        min-height: 48px;
        transition: all 0.3s ease;
    }

    .modern-tabs .mud-tab-active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

/* Expansion Panels */
.payment-panel {
    background: white;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

    .payment-panel:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        border-color: #667eea;
    }

    .payment-panel .mud-expand-panel-header {
        padding: 16px 20px;
        background: linear-gradient(145deg, #ffffff, #fafbfc);
    }

    .payment-panel .mud-expand-panel-content {
        padding: 20px;
        background: #fafbfc;
    }

/* Status Chips */
.status-chip {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

    .status-chip.primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .status-chip.success {
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
        color: white;
    }

    .status-chip.error {
        background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
        color: white;
    }

    .status-chip.default {
        background: linear-gradient(145deg, #e9ecef, #f8f9fa);
        color: #495057;
    }

/* KPI Cards */
.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .kpi-card::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        animation: pulse 3s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.kpi-card.variant-2 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kpi-card.variant-3 {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.kpi-card.variant-4 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

    .chart-card h6 {
        font-weight: 600;
        color: #2d3748;
        margin-bottom: 16px;
    }

.payments-chart canvas {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    padding: 16px;
}

/* Service Badges */
.service-badge {
    background: linear-gradient(145deg, #e9ecef, #f8f9fa);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

    .service-badge:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }



/* Payment Form */
.payment-form {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

    .payment-form .mud-input-root {
        border-radius: 12px;
    }

/* Info Badge */
.info-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 12px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

/* Skeleton Loader */
.modern-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .payments-page {
        padding: 12px;
    }

    .filter-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .kpi-value {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-panel {
    animation: fadeIn 0.3s ease-out;
}

/* Compact overrides */
.payments-page .mud-table-cell {
    padding: 8px 12px;
}

.payments-page .mud-chip {
    height: auto;
    min-height: 24px;
}


.payment-info-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.payment-info-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #2196F3;
}

.payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(145deg, #ffffff, #fafbfc);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.patient-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-name-badge {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

.payment-date-badge {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.payment-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px 20px;
    background: #fafbfc;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

    .info-item:hover {
        border-color: rgba(33, 150, 243, 0.3);
        background: rgba(33, 150, 243, 0.02);
        transform: translateX(2px);
    }

.info-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.info-value {
    color: #212529;
    font-weight: 600;
    font-size: 0.95rem;
}

.badge-amount {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.badge-discount {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.badge-balance {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

    .badge-balance.completed {
        background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    }

.payment-details-section {
    padding: 16px 20px;
    background: white;
}

.section-header {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-value-text {
    color: #212529;
    font-weight: 600;
    font-size: 0.95rem;
}

.method-chip {
    background: linear-gradient(145deg, #e9ecef, #f8f9fa);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 600;
    color: #495057;
}

.payment-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafbfc;
}

.action-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .action-button.view {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white;
    }

    .action-button.edit {
        background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
        color: white;
    }

    .action-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.total-amount-box {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 20px;
    border-radius: 0 0 16px 16px;
    text-align: center;
}

.total-label-text {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.total-value-text {
    font-size: 2rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .payment-info-grid {
        grid-template-columns: 1fr;
    }

    .total-value-text {
        font-size: 1.5rem;
    }
}
