/* 
 * Custom Styles for Malnutrition Screening System
 * css/styles.css
 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 4px 6px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #1e293b;
    line-height: 1.6;
}

.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    transition: transform 0.2s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.card-custom {
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    padding: 1.25rem;
    font-weight: 600;
}

.card-body-custom {
    padding: 2rem;
}

.form-label-custom {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-custom {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    outline: none;
}

.form-select-custom {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-select-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    outline: none;
}

.btn-custom {
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-success-custom {
    background-color: var(--success-color);
    color: white;
}

.btn-success-custom:hover {
    background-color: #059669;
    transform: translateY(-2px);
}

.btn-danger-custom {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger-custom:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: white;
}

.badge-custom {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-success-custom {
    background-color: var(--success-color);
    color: white;
}

.badge-warning-custom {
    background-color: var(--warning-color);
    color: white;
}

.badge-danger-custom {
    background-color: var(--danger-color);
    color: white;
}

.badge-info-custom {
    background-color: var(--info-color);
    color: white;
}

.status-badge-large {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.5rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.metric-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateX(5px);
}

.metric-card h6 {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card h4 {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

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

.dashboard-card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.dashboard-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.dashboard-card-label {
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
}

.table-custom thead th {
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    border: none;
}

.table-custom tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-custom {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert-custom {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
    display: flex;
    align-items: center;
}

.alert-success-custom {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-warning-custom {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-danger-custom {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-info-custom {
    background-color: #cffafe;
    color: #164e63;
}

.alert-custom i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.recommendation-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.recommendation-item i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.progress-custom {
    height: 30px;
    border-radius: 15px;
    background-color: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-bar-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.6s ease;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
}

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

.login-header h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
}

.footer-custom {
    background-color: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-custom p {
    margin: 0;
    color: #94a3b8;
}

.footer-custom a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-custom a:hover {
    color: white;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body-custom {
        padding: 1.5rem;
    }
    
    .status-badge-large {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
    }
    
    .dashboard-card-value {
        font-size: 2rem;
    }
    
    .metric-card h4 {
        font-size: 1.5rem;
    }
}

.text-primary-custom { color: var(--primary-color) !important; }
.text-success-custom { color: var(--success-color) !important; }
.text-warning-custom { color: var(--warning-color) !important; }
.text-danger-custom { color: var(--danger-color) !important; }
.text-info-custom { color: var(--info-color) !important; }

.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-success-custom { background-color: var(--success-color) !important; }
.bg-warning-custom { background-color: var(--warning-color) !important; }
.bg-danger-custom { background-color: var(--danger-color) !important; }

.shadow-sm-custom { box-shadow: var(--card-shadow); }
.shadow-md-custom { box-shadow: var(--card-shadow-hover); }

.rounded-custom { border-radius: 8px; }
.rounded-lg-custom { border-radius: 12px; }