/* ========================================================
   Diet Plan Generator - Custom Medical Theme Stylesheet
   Bootstrap 5 + Glassmorphism + Responsive Sidebar
   ======================================================== */

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

:root {
    --primary-color: #0284c7;     /* Ocean Blue */
    --primary-hover: #0369a1;
    --secondary-color: #0d9488;   /* Medical Teal */
    --accent-color: #10b981;      /* Health Green */
    --warning-color: #f59e0b;     /* Amber */
    --danger-color: #ef4444;      /* Soft Red */
    --dark-bg: #0f172a;           /* Slate Dark */
    --light-bg: #f8fafc;          /* Soft Ice White */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --hover-shadow: 0 20px 25px -5px rgba(2, 132, 199, 0.12), 0 8px 10px -6px rgba(2, 132, 199, 0.08);
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.custom-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.custom-card:hover {
    border-color: var(--primary-color);
}

/* Navbar Customization */
.navbar-custom {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 0.8rem 1.5rem;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(2, 132, 199, 0.08);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 50%, #0d9488 100%);
    color: #ffffff;
    padding: 5rem 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.badge-medical {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Metric Widgets */
.metric-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.metric-box.metric-primary { border-left-color: var(--primary-color); }
.metric-box.metric-success { border-left-color: var(--accent-color); }
.metric-box.metric-warning { border-left-color: var(--warning-color); }
.metric-box.metric-info    { border-left-color: var(--secondary-color); }

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Sidebar Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 260px;
    background-color: var(--dark-bg);
    color: #ffffff;
    flex-shrink: 0;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.dashboard-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--light-bg);
    overflow-x: hidden;
}

/* Meal Time Timeline Cards */
.meal-timeline-card {
    border-left: 5px solid var(--primary-color);
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}

.meal-badge {
    background-color: rgba(2, 132, 199, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

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

.btn-success {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

/* Custom Table Styles */
.table-custom {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-custom thead {
    background-color: #f1f5f9;
    color: var(--text-primary);
    font-weight: 600;
}

/* Print Optimization Styles */
@media print {
    .navbar-custom, .sidebar, .btn-print-hide, footer, .alert {
        display: none !important;
    }
    
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .dashboard-content, main {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .glass-card, .custom-card, .meal-timeline-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}
