﻿/* ---------------------------------------------------------
   모두의식단 Premium UI Style - Final Version
   - Theme: Indigo & Slate Blue
   - Fix: Button State Visibility & Mobile Padding
   --------------------------------------------------------- */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

html {
    scroll-behavior: smooth;
}

:root {
    /* Color Palette */
    --brand-primary: #4f46e5;    /* Indigo Blue */
    --brand-secondary: #818cf8;  /* Light Indigo */
    --brand-hover: #4338ca;      /* Darker Indigo */
    --brand-accent: #f97316;     /* Orange (Calories) */
    --bg-soft: #f8fafc;          /* Slate 50 */
    --surface-white: #ffffff;
    --text-main: #1e293b;        /* Slate 800 */
    --text-muted: #64748b;       /* Slate 500 */
    --border-light: rgba(226, 232, 240, 0.8);
    
    /* Shadows */
    --soft-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --premium-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* 1. Global Base */
body {
    background-color: var(--bg-soft);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.03em;
    padding-top: 80px; /* Fixed Navbar 여백 */
    line-height: 1.6;
}

a {
    color: var(--brand-primary);
    transition: all 0.25s ease;
    text-decoration: none;
}
a:hover {
    color: var(--brand-secondary);
    text-decoration: none;
}

/* 2. Glassmorphism Navbar (고급 헤더) */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    height: 65px;
    z-index: 1050;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
    padding: 0 15px;
}

.navbar-brand {
    float: none;
    height: auto;
    padding: 0;
    margin: 0;
    font-size: 20px !important;
    font-weight: 900;
    color: var(--brand-primary) !important;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
}

.navbar-toggle {
    float: none;
    margin: 0;
    padding: 8px;
    border: none !important;
    background-color: transparent !important;
}

.navbar-toggle .icon-bar {
    background-color: var(--brand-primary) !important;
    height: 3px;
    width: 22px;
    border-radius: 2px;
}

/* 3. Navigation Pills (세그먼트 컨트롤) */
.nav-pill-group {
    display: inline-flex;
    background: #eef2ff;
    padding: 5px;
    border-radius: 16px;
    margin: 20px 0;
}

.nav-pill-btn {
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--brand-secondary);
    border: none;
    background: transparent;
    transition: 0.2s;
    text-decoration: none !important;
}

.nav-pill-btn.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: var(--soft-shadow);
}

/* 4. Premium Cards */
.panel {
    background: var(--surface-white);
    border: 1px solid var(--border-light) !important;
    border-radius: 24px !important;
    box-shadow: var(--soft-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--premium-shadow);
}

.card-accent-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

.meal-date-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #f1f5f9;
    color: var(--brand-primary);
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 12px;
}

.panel-body {
    padding: 25px !important;
}

/* 5. Buttons & Forms (FIX: Button Color Issue) */
.form-control {
    border-radius: 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    height: 50px !important;
    font-size: 15px !important;
    box-shadow: none !important;
}

.form-control:focus {
    border-color: var(--brand-primary) !important;
}

/* 메인 버튼 스타일 강제 적용 */
.btn-primary {
    background-color: var(--brand-primary) !important;
    background: var(--brand-primary) !important;
    border: none !important;
    border-radius: 14px !important;
    height: 55px;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
}

.btn-primary:hover {
    background-color: var(--brand-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3) !important;
}

/* 클릭 및 포커스 시 흰색으로 변하는 현상 방지 */
.btn-primary:active, 
.btn-primary:focus, 
.btn-primary:active:focus {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* 6. Info Box (안내 문구 섹션) */
.info-box {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin: 40px 0;
    box-shadow: var(--soft-shadow);
    border-left: 6px solid var(--brand-primary);
}

.info-box h5 {
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 10px;
}

/* 7. Footer Design */
.footer {
    background: #fff;
    border-top: 1px solid var(--border-light);
    padding: 60px 0 40px;
    margin-top: 60px;
}

.footer-section h4 {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

/* assets/css/style.css 하단에 추가 */

/* ★ 오늘 날짜 카드 강조 스타일 ★ */
.meal-premium-card.today-highlight {
    border: 2px solid var(--brand-primary) !important; /* 브랜드 인디고 색상 테두리 */
    transform: translateY(-4px); /* 살짝 떠오르는 효과 고정 */
    box-shadow: var(--premium-shadow); /* 더 깊은 그림자 */
}

/* 오늘 배지 스타일 보정 */
.today-label {
    background-color: var(--brand-primary) !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    vertical-align: middle;
}

/* 8. Mobile Optimization */
@media (max-width: 767px) {
    body { padding-top: 75px; padding-left: 10px; padding-right: 10px; }
    
    .container { padding-left: 5px; padding-right: 5px; }
    
    .panel-body { padding: 20px !important; }
    
    .navbar-collapse {
        background: #fff;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        border: none;
        margin-top: 0;
    }
    
    .footer { text-align: center; }
    
    .nav-pill-group { width: 100%; justify-content: center; }
}

/* 9. Loading Spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: .25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}