@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 50%, #fb923c 100%);
    min-height: 100vh;
    color: #333;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(251, 146, 60, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fb923c;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #666;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: #fb923c;
    color: white;
}

.nav-link.logout:hover {
    background: #ef4444;
}

/* Main Content */
.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 80px;
    width: auto;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fb923c;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    font-size: 1.125rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-icon {
    font-size: 2rem;
    padding: 1rem;
    border-radius: 1rem;
}

.stat-card.recipes .stat-value { color: #fb923c; }
.stat-card.recipes .stat-icon { background: #fef7ed; color: #fb923c; }

.stat-card.ingredients .stat-value { color: #3b82f6; }
.stat-card.ingredients .stat-icon { background: #eff6ff; color: #3b82f6; }

.stat-card.categories .stat-value { color: #10b981; }
.stat-card.categories .stat-icon { background: #ecfdf5; color: #10b981; }

.stat-card.alerts .stat-value { color: #ef4444; }
.stat-card.alerts .stat-icon { background: #fef2f2; color: #ef4444; }

/* Alert Section */
.alert-section {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-header h3 {
    color: #dc2626;
    font-size: 1.25rem;
    font-weight: 700;
}

.alert-header i {
    color: #dc2626;
    font-size: 1.5rem;
}

.alert-section p {
    color: #991b1b;
    margin-bottom: 1.5rem;
}

.low-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.low-stock-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid #fecaca;
}

.low-stock-item h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stock-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.stock-row .critical {
    color: #dc2626;
    font-weight: 600;
}

.stock-row .recommended {
    color: #3b82f6;
    font-weight: 600;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions i {
    color: #fb923c;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: white;
    text-decoration: none;
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -3px rgba(251, 146, 60, 0.3);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(251, 146, 60, 0.4);
}

.action-card.ingredient-action {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 10px 25px -3px rgba(59, 130, 246, 0.3);
}

.action-card.category-action {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 25px -3px rgba(16, 185, 129, 0.3);
}

.action-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.action-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.action-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

.action-content p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* System Info */
.system-info {
    background: linear-gradient(to right, #f9fafb, #fef7ed);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.info-content h4 {
    color: #333;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.features i {
    color: #fb923c;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fb923c;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: #999;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 2px solid rgba(203, 213, 225, 0.3);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.login-btn {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, #f97316, #ea580c);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.3);
}

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

.login-footer code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    color: #fb923c;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .low-stock-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Form Elements */
.form-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-title i {
    color: #fb923c;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.75rem;
    border: 2px solid rgba(203, 213, 225, 0.3);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f97316, #ea580c);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569, #334155);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #fb923c;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

/* Success/Error Messages */
.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(251, 146, 60, 0.2);
    border-top: 2px solid #fb923c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}