/* Recipe Control Pro - Main Stylesheet */

:root {
    --primary: #7a0019;
    --primary-dark: #5a0013;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.rcp-main {
    min-height: calc(100vh - 200px);
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 600;
}

/* Table Enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(122, 0, 25, 0.04);
}

/* Button Enhancements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #d1d3e2;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(122, 0, 25, 0.25);
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: 700;
}

.navbar-dark {
    background-color: var(--primary) !important;
}

/* Badge Enhancements */
.badge {
    font-size: 0.75em;
    font-weight: 600;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utility Classes */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.border-left-primary {
    border-left: 0.25rem solid var(--primary) !important;
}

.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }

/* Responsive Tables */
.table-responsive {
    border-radius: 0.375rem;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 0.375rem;
    border-left: 4px solid;
}

.alert-success { border-left-color: var(--success); }
.alert-danger { border-left-color: var(--danger); }
.alert-warning { border-left-color: var(--warning); }
.alert-info { border-left-color: var(--info); }
.alert-primary { border-left-color: var(--primary); }

/* Modal Enhancements */
.modal-header {
    border-bottom: 1px solid #e3e6f0;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
}

/* Print Styles */
@media print {
    .navbar, .btn, .alert, .rcp-footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-light {
        background-color: #343a40 !important;
        color: #fff;
    }
    
    .card {
        background-color: #495057;
        color: #fff;
    }
    
    .table {
        color: #fff;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}