/* CSS customizado para o sistema de pesagem */

body { 
    font-family: 'Inter', sans-serif; 
}

.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Melhorias específicas para o sistema */
.pesagem-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pesagem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Animações suaves */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Melhorias para formulários */
.form-enhanced input:focus,
.form-enhanced textarea:focus,
.form-enhanced select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.1);
}

/* Estados de loading */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Melhorias para tabelas responsivas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Melhorias para mobile */
@media (max-width: 768px) {
    .mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    /* Touch targets maiores para mobile */
    .mobile-touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Botões maiores em mobile */
    button, .btn, a[role="button"] {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Inputs maiores em mobile */
    input, textarea, select {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    /* Cards com mais espaçamento */
    .card-mobile {
        margin: 8px;
        padding: 16px;
    }
    
    /* Tabelas responsivas com scroll horizontal */
    .table-mobile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-mobile table {
        min-width: 600px;
    }
    
    /* Navegação mobile melhorada */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 8px;
        z-index: 50;
    }
    
    .mobile-nav-item {
        flex: 1;
        text-align: center;
        padding: 8px;
        border-radius: 8px;
        transition: background-color 0.2s;
    }
    
    .mobile-nav-item:hover {
        background-color: #f3f4f6;
    }
    
    .mobile-nav-item.active {
        background-color: #dbeafe;
        color: #1a56db;
    }
}

/* Melhorias para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .tablet-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tablet-full {
        grid-column: 1 / -1;
    }
}

/* Animações suaves para mobile */
@media (prefers-reduced-motion: no-preference) {
    .mobile-smooth {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
    .xs-text {
        font-size: 14px;
    }
    
    .xs-padding {
        padding: 8px;
    }
    
    .xs-margin {
        margin: 4px;
    }
    
    /* Stack vertical em telas muito pequenas */
    .xs-stack {
        flex-direction: column;
    }
    
    .xs-stack > * {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Melhorias para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .landscape-compact {
        padding: 8px;
    }
    
    .landscape-compact .card {
        margin: 4px 0;
    }
}

/* Melhorias de performance para mobile */
.mobile-optimized {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Estados de loading para mobile */
.mobile-loading {
    position: relative;
    overflow: hidden;
}

.mobile-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Melhorias para formulários em mobile */
@media (max-width: 768px) {
    .form-mobile {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .form-mobile .form-group {
        display: flex;
        flex-direction: column;
    }
    
    .form-mobile label {
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    .form-mobile input,
    .form-mobile textarea,
    .form-mobile select {
        border-radius: 8px;
        border: 2px solid #e5e7eb;
        transition: border-color 0.2s;
    }
    
    .form-mobile input:focus,
    .form-mobile textarea:focus,
    .form-mobile select:focus {
        border-color: #1a56db;
        outline: none;
        box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
    }
}

/* Melhorias para tabelas em mobile */
@media (max-width: 768px) {
    .table-mobile-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-mobile-responsive table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .table-mobile-responsive th,
    .table-mobile-responsive td {
        padding: 12px 8px;
        text-align: left;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .table-mobile-responsive th {
        background-color: #f9fafb;
        font-weight: 600;
        font-size: 14px;
    }
    
    .table-mobile-responsive td {
        font-size: 14px;
    }
}

/* Melhorias para cards em mobile */
@media (max-width: 768px) {
    .card-mobile-optimized {
        margin: 8px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }
    
    .card-mobile-optimized .card-header {
        padding: 16px;
        background: linear-gradient(135deg, #1a56db, #3b82f6);
        color: white;
    }
    
    .card-mobile-optimized .card-body {
        padding: 16px;
    }
}

/* Melhorias para botões em mobile */
@media (max-width: 768px) {
    .btn-mobile {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s;
    }
    
    .btn-mobile:active {
        transform: scale(0.98);
    }
    
    .btn-mobile-primary {
        background: linear-gradient(135deg, #1a56db, #3b82f6);
        color: white;
        border: none;
    }
    
    .btn-mobile-secondary {
        background: #f3f4f6;
        color: #374151;
        border: 2px solid #e5e7eb;
    }
}
