/* =====================================================
    RESET & GLOBAL STYLES
===================================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #152c4f;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

:root {
    --navy: #0f2b5b;
    --navy-dark: #081733;
    --navy-light: #173c70;
    --accent-gold: #d4a359;
    --accent-yellow: #ffc107;
    --accent-glow: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
}

/* =====================================================
    LAYOUT & CONTAINER
===================================================== */
.page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.poster, .container-app {
    width: 100%;
    max-width: 1000px;
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* =====================================================
    NAVBAR & HEADER
===================================================== */
.bgn-blue, nav.bgn-blue {
    background-color: var(--navy);
}

.text-bgn-blue {
    color: var(--navy);
}

.bgn-gold, .text-yellow-300 {
    color: var(--accent-gold);
}

.bg-bgn-gold {
    background-color: var(--accent-gold);
}

.premium-shadow {
    box-shadow: 0 10px 30px -5px rgba(15, 43, 91, 0.1);
}

/* Hero Header dari Referensi Poster */
.hero {
    position: relative;
    width: 100%;
    padding: clamp(20px, 4vw, 35px) clamp(18px, 4vw, 40px) 35px;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #ffffff;
}

.hero::after {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    right: -230px;
    top: -250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 68%);
    pointer-events: none;
}

.logo-row {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    animation: bounceInDown 1s cubic-bezier(.16, 1, .3, 1) both;
}

.logo-item {
    width: clamp(100px, 16vw, 140px);
    height: clamp(100px, 16vw, 140px);
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: pulseLogo 3.5s infinite ease-in-out;
}

.title-area {
    position: relative;
    z-index: 8;
    text-align: center;
    margin: 15px auto 0;
    animation: titleIn 1.2s ease-out .2s both;
}

.main-title {
    margin: 0;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 5vw, 45px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* =====================================================
    DROPDOWN TANGGAL & INTERAKTIF
===================================================== */
.date-wrap {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    padding: 0 10px;
    animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) .3s both;
}

.date-select-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: clamp(280px, 90vw, 360px);
}

.date-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(30, 58, 138, 0.45);
}

.date-select-btn select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(12px, 3.5vw, 14px);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-align-last: center;
    padding: 0 35px;
}

.date-select-btn select option {
    background-color: #0f172a;
    color: #ffffff;
}

.date-icon-left, .date-icon-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #93c5fd;
    pointer-events: none;
}
.date-icon-left { left: 16px; }
.date-icon-right { right: 16px; }

/* =====================================================
    KARTU KONTEN & GRID
===================================================== */
.content {
    flex: 1;
    position: relative;
    background: #f8fafc;
    padding: clamp(20px, 4vw, 40px) clamp(15px, 4vw, 30px) 50px;
}

.menu-card, .nutrition-card, .portion-box-pro {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: clamp(15px, 3vw, 25px) auto 0;
    padding: clamp(15px, 3vw, 24px);
    background: #ffffff;
    border-radius: clamp(15px, 3vw, 22px);
    box-shadow: 0 10px 30px -5px rgba(15, 43, 91, 0.08);
    border: 1px solid #e2e8f0;
    animation: fadeInUp .8s ease both;
}

/* =====================================================
    FORM STYLING (LENGKAP & PROFESIONAL)
===================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(15, 43, 91, 0.12);
}

.form-control::placeholder {
    color: #94a3b8;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
    TABEL RESPONSIF (CLEAN & MODERN)
===================================================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    text-align: left;
    font-size: 13px;
}

.custom-table th {
    background-color: var(--navy);
    color: #ffffff;
    font-weight: 700;
    padding: 14px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.custom-table td {
    padding: 12px 16px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.2s ease;
}

/* =====================================================
    PROGRESS BAR & STATISTIK PORSI
===================================================== */
.portion-box-pro {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
}

.portion-pro-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.portion-pro-card {
    --accent: #6366f1;
    position: relative;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 14px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portion-pro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.portion-pro-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.portion-pro-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
    text-align: center;
}

.portion-pro-number {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(15px, 2.5vw, 20px);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
}

/* Progress bar container */
.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
    width: 0%;
    animation: growBar 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.progress-bar-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
}

@media (max-width: 768px) {
    .portion-pro-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .portion-pro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
    BUTTONS & BADGES
===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-yellow);
    color: var(--navy);
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background-color: #ffca28;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

/* =====================================================
    FOOTER STYLING
===================================================== */
.footer {
    position: relative;
    z-index: 10;
    background-color: var(--navy-dark);
    color: #ffffff;
    padding: 40px 20px 20px;
    border-top: 4px solid var(--accent-yellow);
    font-size: 12px;
}

.footer-content-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: var(--accent-yellow);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer ul li a:hover {
    color: #ffffff;
}

.visitor-box {
    display: inline-block;
    margin: 15px auto 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.visitor-box strong {
    color: var(--accent-yellow);
    font-weight: 800;
}

.footer-copyright {
    text-align: center;
    color: #64748b;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
}

/* =====================================================
    KEYFRAME ANIMATIONS
===================================================== */
@keyframes bounceInDown {
    0% { opacity: 0; transform: translateY(-30px); }
    60% { opacity: 1; transform: translateY(5px); }
    100% { transform: translateY(0); }
}

@keyframes titleIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    80% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
}

@keyframes growBar {
    from { width: 0%; }
    to { width: var(--target-width, 100%); }
}