/* Patients list + history — light medical polish on Filament teal */

.fi-resource-patients .fi-ta-row {
    cursor: pointer;
}

.ph-stat-sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.85;
}

.ph-hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 58%, #2dd4bf 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.18);
}

.ph-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ph-hero-person {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.ph-avatar {
    display: flex;
    height: 4.25rem;
    width: 4.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.ph-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.ph-meta {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
    opacity: 0.92;
}

.ph-meta a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.ph-meta a:hover {
    border-bottom-color: #fff;
}

.ph-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ph-balance {
    min-width: 9rem;
    border-radius: 0.9rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    text-align: right;
}

.ph-balance-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.ph-balance-value {
    margin-top: 0.15rem;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.ph-balance--due {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(254, 202, 202, 0.45);
}

.ph-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .ph-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ph-stat {
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ph-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.ph-stat-value {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.ph-visit {
    border-radius: 0.9rem;
    overflow: hidden;
    border-left: 4px solid #14b8a6;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ph-visit--due {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.dark .ph-visit--due {
    background: rgba(69, 10, 10, 0.35);
}

.ph-visit-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
}

.ph-goods-visit {
    border-radius: 0.9rem;
    overflow: hidden;
    border-left: 4px solid #f59e0b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ph-goods-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b45309;
}

.dark .ph-goods-kicker {
    color: #fbbf24;
}

.ph-good-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 0.8rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ph-good-row:hover {
    border-color: #fcd34d;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.dark .ph-good-row {
    border-color: #374151;
    background: rgba(31, 41, 55, 0.6);
}

.dark .ph-good-row:hover {
    border-color: #b45309;
}

.ph-good-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    border-radius: 0.65rem;
    background: #fef3c7;
    color: #b45309;
}

.dark .ph-good-icon {
    background: rgba(120, 53, 15, 0.5);
    color: #fbbf24;
}

.ph-good-name {
    font-weight: 600;
    color: #111827;
}

.dark .ph-good-name {
    color: #f9fafb;
}

.ph-good-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .ph-good-meta {
    color: #9ca3af;
}

.ph-good-meta strong {
    font-weight: 600;
    color: #374151;
}

.dark .ph-good-meta strong {
    color: #d1d5db;
}

.ph-good-dot {
    color: #d1d5db;
}

.ph-good-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.dark .ph-good-price {
    color: #f9fafb;
}
