/* SmartInventory - Mobile-First Responsive CSS */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand h1 {
    color: #007bff;
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: #007bff;
    color: white;
}

.nav-user {
    color: #666;
    font-size: 0.9rem;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 3rem 0;
}

.logo h1 {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 2rem;
}

.welcome-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.welcome-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.feature .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.feature p {
    color: #666;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-form .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-group small {
    color: #666;
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Main Content */
.main-content {
    padding-bottom: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Sections */
.section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

/* Tables */
.table-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.actions {
    white-space: nowrap;
}

.actions .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Profit Colors */
.profit-positive {
    color: #28a745 !important;
}

.profit-negative {
    color: #dc3545 !important;
}

.stat-card.profit-positive {
    border-left: 4px solid #28a745;
}

.stat-card.profit-negative {
    border-left: 4px solid #dc3545;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 2rem;
}

.auth-links p {
    margin-bottom: 0.5rem;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

/* Responsive Design */
@media (min-width: 576px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .action-buttons {
        justify-content: flex-start;
    }
}

@media (min-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap;
    }
    
    .nav-links {
        flex-wrap: nowrap;
    }
    
    .logo h1 {
        font-size: 4rem;
    }
    
    .welcome-content h2 {
        font-size: 2.5rem;
    }
    
    .form-actions {
        justify-content: flex-start;
    }
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .quick-actions,
    .form-section,
    .filter-section,
    .actions {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .section,
    .table-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
