/* Mobile-First Professional Design for Bakery System */

/* Color Variables - Modern Theme */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0dcaf0;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Custom Bootstrap Overrides */
.bg-primary {
    background: var(--gradient-primary) !important;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 15px 15px 0 0 !important;
    font-weight: bold;
    text-align: center;
    padding: 1.25rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 20px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.bottom-nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    text-align: center;
    flex: 1;
    padding: 8px;
    border-radius: 12px;
    margin: 0 5px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 44px; /* Touch-friendly */
}

.bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid rgba(13, 110, 253, 0.2);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 48px; /* Touch-friendly */
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select {
    border-radius: 10px;
    border: 2px solid rgba(13, 110, 253, 0.2);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 48px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    min-height: 48px;
    transition: all 0.3s ease;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #e74c3c, #dc3545);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #ffca2c);
    border: none;
    color: var(--dark-color);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #20c997);
    border: none;
}

/* Tables */
.table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.table td {
    vertical-align: middle;
    padding: 1rem;
    border-color: rgba(13, 110, 253, 0.1);
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.stat-card .stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 0;
}

.stat-card .stat-label {
    color: var(--dark-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Order Items */
.order-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.order-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Customer List */
.customer-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.customer-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        border-radius: 15px;
    }
    
    .stat-card {
        margin-bottom: 1.5rem;
    }
    
    .stat-card .stat-number {
        font-size: 2rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2.5rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.1), rgba(32, 201, 151, 0.1));
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.1), rgba(231, 76, 60, 0.1));
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: linear-gradient(45deg, rgba(255, 193, 7, 0.1), rgba(255, 202, 44, 0.1));
    border-left: 4px solid var(--warning-color);
    color: #856404;
}

/* Touch Optimizations */
@media (max-width: 768px) {
    .btn, .form-control, .form-select {
        min-height: 48px; /* Apple recommended touch target */
    }
    
    .table td, .table th {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem !important;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .navbar, .bottom-nav, .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
