/* Apple-like Fluidity and MacOS Aesthetics - Color Agnostic Version */

:root {
    --mac-transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --mac-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --mac-radius: 14px;
    --mac-blur: blur(25px);
    --mac-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Global Smoothness */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    /* Subtle font refinement if not already set */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Modern MacOS Scrollbar - Minimal and subtle */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Base Interactions - Transitions only */
button, .btn, .pago-option, .patient-card, .sidebar-tab, .config-tab-btn {
    transition: var(--mac-transition);
    cursor: pointer;
}

button:active, .btn:active {
    transform: scale(0.95);
}

/* Cards & Containers - Refined depth only */
.card, .patient-card, .pos-card-factura, .pos-card-mostrador, .pos-card-pago, .carta-box-factura, .evo-card {
    border-radius: var(--mac-radius);
    box-shadow: var(--mac-shadow);
    transition: var(--mac-spring);
}

.card:hover, .patient-card:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

/* Glassmorphism - Blur only, preserving original backgrounds */
.premium-header, .header-sophisticated, .evo-sidebar, .modal-header {
    /* removed backdrop-filter */
    -webkit-/* removed backdrop-filter */
}

/* Modal Enhancements */
.modal-overlay, .premium-modal-overlay {
    /* removed backdrop-filter */
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.modal-content, .premium-modal, .evo-container {
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    animation: macModalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes macModalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Inputs Refinement - Transitions only */
input, select, textarea {
    border-radius: 10px;
    transition: var(--mac-transition);
}

/* Provider Grid and Card Refinements */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.provider-card {
    background: rgba(255, 255, 255, 0.7);
    /* removed backdrop-filter */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--mac-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--mac-spring);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: providerCardFadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes providerCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.provider-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.provider-info-main {
    margin-bottom: 12px;
}

.provider-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.provider-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provider-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    font-weight: 600;
    width: fit-content;
    margin-top: 4px;
}

.provider-balance-box {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.balance-amount {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.balance-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 2px;
}

.provider-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: var(--mac-transition);
}

.provider-card:hover .provider-actions {
    opacity: 1;
}

.provider-card.inactive {
    opacity: 0.6;
    filter: grayscale(0.5);
}

/* Smooth Tab Panels */
.tab-pane, .config-panel, .view-section {
    animation: macFadeIn 0.4s ease-out;
}

/* Day Cards Refinement - Restoration to original appearance with subtle fluidity */
#login-logo-img, #splash-logo-img {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.card-dia {
    border: 1px solid var(--border);
    transition: var(--mac-spring);
    background: var(--card-bg);
}

.card-dia:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.dia-total-card {
    font-size: 1.4rem !important; /* Adjusted to look closer to image */
    font-weight: 800 !important;
    padding: 8px 12px !important;
    border-radius: 8px !important; /* Original radius from image */
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.mes-titulo {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

.mes-titulo span:first-child {
    flex: 1;
    text-align: center;
    font-weight: 800;
}

.total-mes-grupo {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

@keyframes macFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notification Popups Refinement */
.toast, .notification, .alert {
    border-radius: 14px !important;
    /* removed backdrop-filter */
    border: 1px solid rgba(0,0,0,0.05) !important;
}

/* ===== COLORES AZUL CLARO PARA VENTAS E HISTORIAL ===== */
#view-historial .venta-card,
#view-venta .venta-card {
    background: #f0f9ff !important;
    border-left: 5px solid #3b82f6 !important;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08), 
                0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

#view-historial .venta-card:hover,
#view-venta .venta-card:hover {
    background: #e0f2fe !important;
    border-left-color: #2563eb !important;
    transform: translateX(4px) translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15), 
                0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

#view-historial .venta-head strong,
#view-venta .venta-head strong {
    color: #2563eb !important;
    font-weight: 800 !important;
    font-size: 1.05em !important;
}

/* Mejor espaciado interno */
#view-historial .venta-head,
#view-venta .venta-head {
    margin-bottom: 12px !important;
}

#view-historial .venta-foot,
#view-venta .venta-foot {
    margin-top: 12px !important;
    padding-top: 12px !important;
}

/* Tags más bonitos */
#view-historial .tag-base,
#view-venta .tag-base {
    background: #dbeafe !important;
    color: #1e40af !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    border: 1px solid #93c5fd !important;
}
