/* Estilos personalizados para upZale App */

/* Animaciones modernas */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

/* Estilos para tabs modernos */
.tab-container {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
}

.active-tab {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* Botones modernos con gradientes */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    filter: brightness(1.05);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    filter: brightness(1.05);
}

/* Tarjetas modernas con hover effects */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Header moderno con blur effect */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-logo {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--gray-800);
    transition: all 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

.header-logo img, .header-logo svg {
    height: 2rem;
    width: 2rem;
    margin-right: var(--space-2);
}

.header-logo span {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.125rem;
}

.header-menu-button-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #4b5563;
    transition: background-color 0.2s;
}

.header-menu-button-header:hover {
    background-color: #f3f4f6;
}

/* Menú desplegable moderno */
.dropdown-menu {
    position: absolute;
    right: var(--space-4);
    top: 4rem;
    width: 14rem;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2) 0;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Indicador de Live moderno */
.live-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    transition: all 0.3s ease;
}

.live-indicator.active {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.live-indicator.inactive {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.live-indicator .status {
    display: flex;
    align-items: center;
}

.live-indicator .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--space-2);
    position: relative;
}

.live-indicator.active .status-dot {
    background: var(--danger);
}

.live-indicator.active .status-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

.live-indicator.inactive .status-dot {
    background: var(--gray-400);
}

.live-indicator .status-text {
    @apply font-medium;
}

.live-indicator.active .status-text {
    @apply text-red-800;
}

.live-indicator.inactive .status-text {
    @apply text-gray-800;
}

.live-indicator .action-button {
    @apply text-sm font-medium px-3 py-1 rounded-lg;
}

.live-indicator.active .action-button {
    @apply bg-red-500 text-white;
}

.live-indicator.inactive .action-button {
    @apply bg-green-500 text-white;
}

/* Estadísticas modernas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-1);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Productos modernos */
.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.product-item:hover {
    background: var(--gray-50);
}

.product-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.product-image {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    margin-right: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-1);
}

.product-price {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.product-actions {
    display: flex;
    align-items: center;
}

/* Formularios modernos */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: white;
    color: var(--gray-800);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: white;
    color: var(--gray-800);
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: white;
    color: var(--gray-800);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 1.25rem;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-300);
    appearance: none;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.form-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 0.25rem;
    height: 0.5rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.form-help {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-1);
}

/* Botón flotante moderno */
.floating-button {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: none;
    z-index: 40;
}

.floating-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.05);
}

/* Pantalla de carga moderna */
.loading-screen {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pestañas modernas */
.tab-button {
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* Estilos para navegación inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 40;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    color: #6b7280;
    transition: color 0.2s;
}

.bottom-nav-icon {
    margin-bottom: 0.25rem;
}

.bottom-nav-text {
    font-size: 0.75rem;
}

.bottom-nav-item.active {
    color: #7c3aed;
}

/* Estilos para notificaciones */
.notification {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.info {
    border-left: 4px solid #3b82f6;
} 