html {
    scroll-behavior: smooth;
}

:root {
    --heineken-green: #008248;
    --aside-gradient: radial-gradient(115.79% 86.96% at 71.1% 11.94%, #58b22f, #185321 98.25%);
    --bg-light: #eff2f1; /* 稍微加深一點點背景色，增加對比 */
    --header-height-pc: 120px;
}

.viewport {
    background-color: var(--bg-light); /* 確保全站背景一致 */
}

@media (min-width: 1024px) {
    .viewport aside {
        background: var(--aside-gradient);
    }

    .drawer {
        /* 讓選單捲動區域從 Logo 下方開始 */
        background: transparent;
        margin-top: var(--header-height-pc);
        /* 改為 max-height，內容不夠多時不會撐開 */
        max-height: calc(100vh - var(--header-height-pc));
        height: auto;
        padding-top: 0;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .section--account .container {
        max-width: 50%;
        width: 100%;
        /* 如果內容短，可以考慮取消絕對置頂，讓它在區域內更美觀 */
        margin: 0 auto;
    }
    
    /* PC 版不需要為了手機瀏覽器預留底部 80px */
    .drawer .nav ul {
        padding-bottom: 20px;
    }

    .header--bar {
        /* Logo 區塊透明，透出 aside 的背景 */
        background: transparent;
        height: var(--header-height-pc);
        display: flex;
        align-items: center;
        box-shadow: none;
        z-index: 100; /* 提高層級確保在最上層 */
        position: absolute; /* 相對於 aside 定位 */
        top: 0;
        left: 0;
        width: 100%;
    }

    .header--bar .logo--lg {
        width: 128px;
        margin: 0;
    }
}

.drawer {
    overflow-y: auto !important;
    max-height: 100vh;
    -webkit-overflow-scrolling: touch;
}

.drawer .nav ul {
    /* 這裡是手機版預設，會被上面的 media query 在 PC 版覆蓋 */
    padding-bottom: 80px;
}

.menu-header {
    font-weight: 800;
    color: var(--heineken-green);
    padding: 10px 20px;
    background-color: #f1f3f2;
    margin-top: 10px;
}

.drawer .nav ul li a .label {
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.drawer .nav ul li a .label i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
}

/* 選單捲動條樣式優化 */
.drawer::-webkit-scrollbar {
    width: 4px;
}
.drawer::-webkit-scrollbar-thumb {
    background: rgba(0, 130, 72, 0.2);
    border-radius: 4px;
}

/* 儀表板更美化樣式 - 移至共用 CSS */
.dashboard-sections {
    padding: 10px 15px;
}

.dashboard-group {
    background: #ffffff;
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 10px -3px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 130, 72, 0.05);
    position: relative;
    overflow: hidden;
}

.dashboard-group::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #008248, #00b362);
}

.dashboard-group-title {
    font-size: 15px;
    font-weight: 800;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.dashboard-group-title i {
    color: #008248;
    margin-right: 8px;
    font-size: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.dashboard-card {
    background: linear-gradient(145deg, #ffffff, #f9fbf9);
    padding: 20px 10px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(0, 130, 72, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-decoration: none !important;
}

.dashboard-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: #f0f7f3;
}

.dashboard-card .icon-wrapper {
    width: 44px;
    height: 44px;
    background: rgba(0, 130, 72, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #008248;
    transition: all 0.3s ease;
}

.dashboard-card:hover .icon-wrapper {
    background: #008248;
    color: #ffffff;
}

.dashboard-card .icon {
    font-size: 22px;
    margin-bottom: 0 !important;
    opacity: 1 !important;
}

.dashboard-card .value {
    font-size: 28px;
    font-weight: 850;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.dashboard-card .label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
}

/* QR Code 專用卡片優化 */
.qrcode-card {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 130, 72, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

/* 純文字圓圈圖示樣式 (主要用於 JP/NON-JP) */
.dashboard-card .circle-text {
    width: 44px;
    height: 44px;
    background: rgba(0, 130, 72, 0.08);
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #008248;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -0.5px;
    border: 1px solid rgba(0, 130, 72, 0.2);
    transition: all 0.3s ease;
}

.dashboard-card:hover .circle-text {
    background: #008248;
    color: #ffffff;
    transform: scale(1.05);
}

/* QR Code 響應式容器 */
.qrcode-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05); /* 稍微加深邊框線 */
    width: 100%;
    max-width: 280px; /* PC 版最大寬度 */
    box-sizing: border-box;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02); /* 加入一點點內陰影增加立體感 */
}

.qrcode-wrapper svg {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
}

@media (max-width: 375px) {
    .qrcode-wrapper {
        max-width: 220px; /* 極窄螢幕縮小容量 */
        padding: 10px;
    }
}

.button-primary {
    background-color: var(--heineken-green) !important;
    border: none !important;
    border-radius: 25px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
    cursor: pointer;
}

.button-primary .label {
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.button-primary:active {
    transform: scale(0.98);
    background-color: #006639 !important;
}

/* 讓原本的 IS-INVERT 按鈕也更統一 */
.button.is-invert.is-white {
    border: 1px solid rgba(0, 130, 72, 0.3) !important;
    border-radius: 25px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #fff !important;
}

.button.is-invert.is-white .label {
    color: var(--heineken-green) !important;
    font-weight: 800 !important;
}

/* QA 頁面樣式 */
.qa-section {
    padding: 60px 0;
}
.qa-group {
    margin-bottom: 30px;
}
.qa-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #008248;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #008248;
    display: flex;
    align-items: center;
}
.qa-group-title i {
    margin-right: 10px;
}
.qa-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}
.qa-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    user-select: none;
}
.qa-question:hover {
    background-color: #f9f9f9;
}
.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fdfdfd;
    border-top: 0 solid #eee;
}
.qa-answer-content {
    padding: 20px;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}
.qa-item.active {
    border-color: #008248;
    box-shadow: 0 8px 25px rgba(255, 45, 45, 0.1);
}
.qa-item.active .qa-answer {
    max-height: 500px;
    border-top-width: 1px;
}
.qa-icon {
    transition: transform 0.3s ease;
    color: #999;
}
.qa-item.active .qa-icon {
    transform: rotate(180deg);
    color: #008248;
}
.qa-q-prefix {
    color: #008248;
    margin-right: 8px;
    font-weight: 800;
}
.qa-a-prefix {
    color: #28a745;
    margin-right: 8px;
    font-weight: 800;
}
.highlight {
    color: #008248;
    font-weight: 600;
}
