/* Mobile-First CSS for ERP App */

/* Base mobile styles */
body {
    font-size: 16px; /* Prevent iOS zoom */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Touch-friendly interactive elements */
.btn, .form-select, .nav-link {
    min-height: 44px;
    min-width: 44px;
}

/* Text inputs should not have min-width restriction */
.form-control {
    min-height: 44px;
}

.btn {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    min-height: 52px;
    padding: 16px 24px;
    font-size: 18px;
}

/* Form inputs */
.form-control, .form-select {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
}

/* Cards */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    padding: 12px 16px;
    font-weight: 500;
}

/* Tables - make them responsive */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .h2 {
        font-size: 1.75rem;
    }
    
    /* Stack form elements vertically on mobile */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: 8px 8px 0 0;
    }
    
    .input-group .btn {
        border-radius: 0 0 8px 8px;
        border-top: none;
    }
    
    /* Improve checkbox touch targets */
    .form-check {
        padding: 8px;
        margin: 4px 0;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 2px;
    }
    
    .form-check-label {
        padding-left: 8px;
        cursor: pointer;
    }
}

/* Landscape tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus styles for accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Utility classes */
.text-overflow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Custom spacing for mobile */
.mobile-spacing {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .mobile-spacing {
        margin-bottom: 1.5rem;
    }
}
