/* ========================================
   Solution 主樣式表 (Luminous Indigo Theme)
   Style Philosophy: Intelligent Trust, Clean, High-Value
   ======================================== */

/* ----------------------------------------
   CSS 變數 (Design Tokens)
   ---------------------------------------- */
:root {
    /* 核心色盤 - Indigo & Slate */
    --color-primary: #4f46e5;
    /* Indigo 600 - 專業信任 */
    --color-primary-dark: #4338ca;
    /* Indigo 700 */
    --color-primary-light: #818cf8;
    /* Indigo 400 */
    --color-accent: #06b6d4;
    /* Cyan 500 - 科技亮點 */

    /* 背景色 - Luminous & Clean */
    --color-bg: #f8fafc;
    /* Slate 50 - 極淺灰白，降低認知負荷 */
    --color-bg-light: #ffffff;
    /* 純白 - 用於卡片，創造層次 */
    --color-bg-subtle: #f1f5f9;
    /* Slate 100 - 用於次要區塊 */
    --color-bg-glass: rgba(255, 255, 255, 0.85);
    /* 玻璃擬態背景 */

    /* 文字色 - High Contrast & Soft */
    --color-text: #0f172a;
    /* Slate 900 - 接近純黑的深藍，高對比易讀 */
    --color-text-muted: #64748b;
    /* Slate 500 - 柔和灰，用於次要資訊 */
    --color-text-light: #94a3b8;
    /* Slate 400 */
    --color-text-inverse: #ffffff;
    /* 反白文字 */

    /* 邊框與裝飾 */
    --color-border: #e2e8f0;
    /* Slate 200 - 輕盈的邊界 */
    --color-border-hover: #cbd5e1;
    /* Slate 300 */

    /* 狀態色 */
    --color-success: #10b981;
    /* Emerald 500 */
    --color-error: #ef4444;
    /* Red 500 */
    --color-warning: #f59e0b;
    /* Amber 500 */
    --color-info: #3b82f6;
    /* Blue 500 */

    /* 陰影系統 - Depth & Float */
    --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.08), 0 2px 4px -1px rgb(15 23 42 / 0.04);
    --shadow-lg: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -2px rgb(15 23 42 / 0.04);
    --shadow-xl: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 10px 10px -5px rgb(15 23 42 / 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);
    /* Indigo Glow */
    --shadow-primary: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
    /* 主按鈕陰影 */

    /* 圓角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
    --radius-2xl: 1.5rem;
    /* 24px */

    /* 字體 */
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ----------------------------------------
   基礎重置
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ----------------------------------------
   頁首 (Glassmorphism)
   ---------------------------------------- */
.header {
    background: var(--color-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    width: auto;
    height: 38px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.03);
}

.nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav a:not(.btn):not(.oauth-btn) {
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9375rem;
}

.nav a:not(.btn):not(.oauth-btn):hover {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.05);
}

/* ----------------------------------------
   語言切換器
   ---------------------------------------- */
.lang-switcher {
    margin-left: 0.5rem;
}

.lang-select {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.lang-select:hover {
    border-color: var(--color-border-hover);
}

.lang-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ----------------------------------------
   主要內容
   ---------------------------------------- */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 200px);
}

/* ----------------------------------------
   按鈕 (High Value Actions)
   ---------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    gap: 0.5rem;
    letter-spacing: 0.01em;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

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

/* 高轉換率 CTA 按鈕 - 行銷心理學優化 */
/* 橘色是轉換率之王：激發多巴胺、創造緊迫感、同時保持友善 */
.btn-cta {
    --cta-orange: #f97316;
    /* Orange 500 */
    --cta-orange-dark: #ea580c;
    /* Orange 600 */
    --cta-orange-light: #fb923c;
    /* Orange 400 */
    --cta-glow: rgba(249, 115, 22, 0.4);

    background: linear-gradient(135deg, var(--cta-orange) 0%, var(--cta-orange-dark) 100%);
    color: white;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    box-shadow:
        0 4px 14px 0 var(--cta-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
    animation: ctaPulse 2.5s ease-in-out infinite;
}

/* 光暈脈動動畫 - 吸引視覺注意力 */
@keyframes ctaPulse {

    0%,
    100% {
        box-shadow:
            0 4px 14px 0 var(--cta-glow),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow:
            0 6px 24px 0 rgba(249, 115, 22, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
}

/* 懸停狀態：強化視覺回饋 */
.btn-cta:hover {
    background: linear-gradient(135deg, var(--cta-orange-light) 0%, var(--cta-orange) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 25px 0 rgba(249, 115, 22, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: none;
}

/* 點擊狀態 */
.btn-cta:active {
    transform: translateY(0) scale(1);
    box-shadow:
        0 2px 8px 0 var(--cta-glow),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 光澤效果 */
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.btn-cta:hover::before {
    left: 100%;
}

/* 按鈕尺寸變體 */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-bg-subtle);
    color: var(--color-error, #ef4444);
    border-color: var(--color-error, #ef4444);
}

.inline-form {
    display: inline;
}

/* Pending 訂單提醒 Banner */
.pending-orders-banner {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(251, 191, 36, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pending-banner-icon {
    flex-shrink: 0;
    color: #f59e0b;
    margin-top: 0.125rem;
}

.pending-banner-content {
    flex: 1;
    min-width: 0;
}

.pending-banner-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 0.25rem 0;
}

.pending-banner-desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem 0;
}

.pending-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    margin-bottom: 0.5rem;
}

.pending-order-item:last-child {
    margin-bottom: 0;
}

.pending-order-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.pending-order-product {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.pending-order-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.pending-order-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Action Section 樣式 */
.action-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.action-section .btn {
    width: 100%;
    justify-content: center;
}

/* 登入提示區塊 - 行銷心理學優化設計 */
/* 策略：溫暖漸層 + 信任感 + 緊迫性 + 低阻力行動路徑 */
.login-required {
    text-align: center;
    padding: 2rem 2.5rem;
    /* 溫暖的漸層背景 - 激發積極情緒 */
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.08) 0%,
            rgba(6, 182, 212, 0.06) 50%,
            rgba(16, 185, 129, 0.05) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

/* 微光效果 - 吸引視覺注意力 */
.login-required::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: loginShimmer 3s ease-in-out infinite;
}

@keyframes loginShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.login-required p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.0625rem;
    position: relative;
}

/* 鎖定圖示 - 暗示解鎖價值 */
.login-required p::before {
    content: '🔐';
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    animation: lockBounce 2s ease-in-out infinite;
}

@keyframes lockBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.trial-form {
    margin-top: 0.5rem;
}

/* ----------------------------------------
   OAuth 按鈕 (Google / LINE) - 行銷心理學優化
   ---------------------------------------- */
.oauth-btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
    box-sizing: border-box;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.oauth-btn svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

/* Google Button - 簡潔可信 */
.oauth-btn-google {
    background: #FFFFFF;
    color: #1F1F1F !important;
    border: 1.5px solid #dadce0;
    font-family: 'Roboto', var(--font-family);
    box-shadow: 0 2px 6px 0 rgba(60, 64, 67, 0.15);
}

.oauth-btn-google:hover {
    background: #F8F9FA;
    border-color: #c4c7c5;
    box-shadow: 0 4px 12px 0 rgba(60, 64, 67, 0.2);
    transform: translateY(-2px);
}

.oauth-btn-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.2);
}

/* LINE Button - 活力醒目 */
.oauth-btn-line {
    background: linear-gradient(135deg, #06C755 0%, #00B74A 100%);
    color: #FFFFFF !important;
    border: none;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.35);
}

.oauth-btn-line:hover {
    background: linear-gradient(135deg, #00B74A 0%, #00A040 100%);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.45);
    transform: translateY(-2px);
}

.oauth-btn-line:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(6, 199, 85, 0.3);
}

.oauth-btn-line-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 0.25rem;
}

/* ----------------------------------------
   桌面版圖示按鈕 (OAuth Icon Mode)
   ---------------------------------------- */
.oauth-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.oauth-btn-icon .oauth-btn-text {
    display: none;
}

.oauth-btn-icon .oauth-btn-line-divider {
    display: none;
}

.oauth-btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Tooltip via ::after pseudo-element */
.oauth-btn-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -2.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: var(--color-text-inverse);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.oauth-btn-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------
   漢堡按鈕 (Hamburger Button)
   ---------------------------------------- */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 漢堡按鈕 active 狀態 → X */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ----------------------------------------
   手機選單遮罩 (Mobile Overlay)
   ---------------------------------------- */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------
   手機側邊導航 (Mobile Nav)
   ---------------------------------------- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 999;
    background: var(--color-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--color-border);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.mobile-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-close:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

.mobile-nav-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
}

/* 手機選單內的導航連結 */
.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--color-primary);
}

.mobile-nav-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
    font-family: inherit;
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

.mobile-nav-logout:hover {
    color: var(--color-error);
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.mobile-nav-logout svg {
    flex-shrink: 0;
}

/* 手機選單內的 OAuth 按鈕：全寬垂直排列 */
.mobile-nav-oauth {
    width: 100%;
    justify-content: center;
}

/* 手機選單內的語言切換器：全寬 */
.mobile-nav-lang {
    margin-left: 0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.mobile-nav-lang .lang-select {
    width: 100%;
}

/* ----------------------------------------
   頁尾
   ---------------------------------------- */
.footer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: auto;
}

/* ----------------------------------------
   卡片 (Clean & Deep)
   ---------------------------------------- */
.card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ----------------------------------------
   動畫
   ---------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-in[style*="--delay"] {
    animation-delay: var(--delay);
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ----------------------------------------
   Flash 訊息
   ---------------------------------------- */
.flash {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid transparent;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: var(--color-success);
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--color-error);
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: var(--color-warning);
}

/* ----------------------------------------
   表單元素
   ---------------------------------------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-light);
}

/* ----------------------------------------
   表格
   ---------------------------------------- */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.table th {
    background: var(--color-bg-subtle);
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover td {
    background: var(--color-bg-subtle);
}

/* ----------------------------------------
   分頁
   ---------------------------------------- */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-muted);
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.pagination a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary-light);
    background: var(--color-bg-subtle);
}

.pagination .active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

/* ========================================
   工具類別 (Utility Classes)
   ======================================== */
.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-1 {
    flex: 1 1 0%;
}

.w-full {
    width: 100%;
}

.gap-4 {
    gap: 1rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.font-bold {
    font-weight: 700;
}

.is-hidden {
    display: none;
}

/* ========================================
   頁面特定樣式
   ======================================== */

/* --- Back Link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-top: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary);
    transform: translateX(-4px);
}

/* --- Login Component - 轉換率優化 --- */
.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    position: relative;
}

/* 移除舊的「或」分隔線樣式，改用更直接的呈現 */
.login-title {
    display: none;
}

/* --- Member Orders --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
}

.filters {
    display: flex;
    gap: 0.5rem;
    background: var(--color-bg-light);
    padding: 0.25rem;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
}

.filter-btn {
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--color-text);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.orders-table th,
.orders-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.orders-table th {
    background: var(--color-bg-subtle);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.order-number {
    font-family: monospace;
    font-weight: 600;
    color: var(--color-text);
}

.order-status {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-status-paid {
    background: #ecfdf5;
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.order-status-pending {
    background: #fffbeb;
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.order-status-refunded {
    background: #eff6ff;
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.order-status-cancelled {
    background: #f1f5f9;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

/* --- Member Settings --- */
.settings-header {
    margin-bottom: 2rem;
}

.settings-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.settings-sections {
    display: grid;
    gap: 2rem;
}

.settings-section {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.settings-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--color-border);
}

.info-label {
    color: var(--color-text-muted);
}

.info-value {
    font-weight: 500;
    color: var(--color-text);
}

.provider-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    accent-color: var(--color-primary);
}

.checkbox-label {
    font-weight: 500;
    color: var(--color-text);
}

.checkbox-label .desc {
    display: block;
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* --- Checkout Confirm --- */
.checkout-container {
    max-width: 800px;
    margin: 3rem auto;
}

.confirm-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-glow);
    max-width: 500px;
    margin: 0 auto;
}

.confirm-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.order-summary-checkout {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
}

.summary-item .label {
    color: var(--color-text-muted);
}

.summary-item .value {
    font-weight: 600;
}

.summary-item.total {
    border-top: 1px solid var(--color-border-hover);
    margin-top: 0.75rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    color: var(--color-primary);
}

.customer-info {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.customer-info h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.terms-checkbox {
    margin: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.terms-checkbox a {
    color: var(--color-primary);
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.payment-note {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-light);
}

/* --- Product Attribute Selector --- */
#product-attributes-selector {
    margin-bottom: 1.5rem;
}

.attr-selector-group {
    margin-bottom: 1rem;
}

.attr-selector-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.attr-selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attr-option-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    min-width: 80px;
    text-align: center;
}

.attr-option-btn:hover:not(.is-disabled) {
    border-color: var(--color-primary);
    background: var(--color-bg-subtle);
}

.attr-option-btn.is-active {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-primary);
    font-weight: 600;
}

.attr-option-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--color-bg-subtle);
}

.attr-option-btn .option-label {
    font-weight: 500;
}

.attr-option-btn .option-price {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.125rem;
}

.attr-option-btn.is-active .option-price {
    color: var(--color-primary);
}

.attr-option-btn .option-stock-out {
    font-size: 0.6875rem;
    color: var(--color-danger, #ef4444);
    margin-top: 0.125rem;
}

/* Attribute tags in order detail */
.attr-tag {
    display: inline-block;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.125rem 0.5rem;
    font-size: 0.8125rem;
    margin: 0.125rem 0.25rem 0.125rem 0;
}

.attr-tag small {
    color: var(--color-text-muted);
}

/* Login gate attribute info */
.attr-info-readonly {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.attr-info-group {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.attr-info-label {
    font-weight: 600;
    color: var(--color-text);
}

.attr-info-note {
    color: var(--color-text-light);
    font-style: italic;
    font-size: 0.8125rem;
}

/* --- Checkout Hero --- */
.hero {
    text-align: center;
    padding: 5rem 0 4rem;
    background: radial-gradient(circle at top center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
}

/* --- Checkout Grid --- */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-border);
    transition: background 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.product-card:hover::before {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.product-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.product-card .description {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.product-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-link:hover {
    color: var(--color-primary);
}

.price-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.price-info {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 0 0 2.5rem 0;
    padding: 0;
    flex: 1;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.check-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* --- Checkout Detail --- 行銷心理學優化設計 */
/* 核心策略：信任感 + 價值突顯 + 緊迫暗示 + 情緒引導 */
.product-card-detail {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    box-shadow:
        0 25px 50px -12px rgba(79, 70, 229, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    position: relative;
    overflow: hidden;
    /* 微妙的呼吸動畫 - 吸引注意且不擾人 */
    animation: cardBreathing 4s ease-in-out infinite;
}

@keyframes cardBreathing {

    0%,
    100% {
        box-shadow:
            0 25px 50px -12px rgba(79, 70, 229, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    }

    50% {
        box-shadow:
            0 30px 60px -12px rgba(79, 70, 229, 0.22),
            0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    }
}

/* 頂部漸層條 - 品質感與進度暗示 */
.product-card-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
            var(--color-primary) 0%,
            var(--color-accent) 50%,
            #10b981 100%);
    background-size: 200% 100%;
    animation: gradientFlow 3s ease-in-out infinite;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* 背景裝飾光暈 - 營造高端氛圍 */
.product-card-detail::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.product-name {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.product-description {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.pricing-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: var(--radius-xl);
    /* 價格區域特殊背景 - 錨定注意力 */
    background: linear-gradient(180deg,
            rgba(79, 70, 229, 0.04) 0%,
            transparent 100%);
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

/* 價格顯示 - 錨定效應 + 視覺重量 */
.price-display {
    color: var(--color-primary);
    font-size: 3.5rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    text-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
    /* 價格進場動畫 */
    animation: priceReveal 0.8s ease-out;
}

@keyframes priceReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.currency {
    font-size: 2rem;
    opacity: 0.8;
}

.price-period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 0.25rem;
}

.billing-cycle-selector {
    margin-top: 1.5rem;
}

.cycle-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.cycle-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cycle-option input {
    display: none;
}

.cycle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
}

.cycle-option input:checked+.cycle-btn {
    border-color: var(--color-primary);
    background: rgba(79, 70, 229, 0.05);
    color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.cycle-btn.is-active {
    border-color: var(--color-primary);
    background: rgba(79, 70, 229, 0.08);
    color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.discount-badge {
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.cycle-tag {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.checkout-cycle-selector {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.cycle-note {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
}

.cycle-note-strong {
    color: var(--color-success);
    font-weight: 600;
    margin-right: 0.35rem;
}

.price-note {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.12);
    border-radius: 9999px;
    vertical-align: middle;
}

/* --- 信任徽章區塊 - 行銷心理學 --- */
/* 策略：社會認同 + 風險消除 + 專業形象 */
.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--color-border);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.trust-item:hover {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.05);
}

.trust-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-success);
    flex-shrink: 0;
}

.trust-item:hover .trust-icon {
    color: var(--color-primary);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* --- RWD --- */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }

    .header-content {
        padding: 1rem;
    }

    .main {
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 1.5rem;
    }

    /* 修復 Checkout Detail 手機版 */
    .product-card-detail {
        padding: 1.5rem;
    }

    .cycle-options {
        flex-direction: column;
    }

    .cycle-btn {
        width: 100%;
        justify-content: center;
    }

    /* 修復 Member Area 手機版 */
    .subscription-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .subscription-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .subscription-actions {
        width: 100%;
    }

    .subscription-actions .btn {
        flex: 1;
    }

    /* 信任徽章手機版 */
    .trust-badges {
        gap: 1rem;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    .trust-item {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    /* 登入區塊手機版優化 */
    .login-required {
        padding: 1.5rem;
    }

    .login-required p::before {
        font-size: 1.75rem;
    }
}

/* ========================================
   會員中心 - 優雅設計樣式
   基於 frontend-design skill 美學指南
   ======================================== */

/* --- 會員儀表板容器 --- */
.member-dashboard {
    max-width: 900px;
    margin: 0 auto;
}

/* --- 歡迎區塊 Hero --- */
.member-welcome-hero {
    position: relative;
    background: linear-gradient(135deg,
            rgba(79, 70, 229, 0.08) 0%,
            rgba(6, 182, 212, 0.06) 50%,
            rgba(16, 185, 129, 0.04) 100%);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

/* 裝飾背景元素 */
.welcome-decoration {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle,
            rgba(79, 70, 229, 0.15) 0%,
            transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatDecoration 6s ease-in-out infinite;
}

@keyframes floatDecoration {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-10px, 10px) scale(1.05);
    }
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.welcome-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin: 0;
}

/* --- 訂閱區塊 --- */
.subscriptions-section {
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.section-title svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* --- 空狀態 - 優雅設計版 --- */
.empty-state-modern {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* 背景微妙紋理 */
.empty-state-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.empty-state-visual {
    margin-bottom: 1.5rem;
    position: relative;
}

/* 圖示容器 - 控制尺寸 */
.empty-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
}

/* 關鍵修正：限制 SVG 尺寸 - 使用強選擇器 */
.empty-state-modern .empty-icon-wrapper .empty-icon,
.empty-state-modern svg.empty-icon,
svg.empty-icon {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    color: var(--color-primary);
    position: relative;
    z-index: 1;
    opacity: 0.8;
}

/* 脈動光暈效果 */
.empty-icon-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg,
            rgba(79, 70, 229, 0.15) 0%,
            rgba(6, 182, 212, 0.1) 100%);
    border-radius: 50%;
    animation: iconPulse 2.5s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.3;
    }
}

.empty-state-content {
    position: relative;
    z-index: 1;
}

.empty-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.empty-description {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 快捷功能區 --- */
.member-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.quick-action-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.quick-action-card:hover .quick-action-icon {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    transform: scale(1.1);
}

.quick-action-card:hover .quick-action-icon svg {
    color: white;
}

.quick-action-card:hover .quick-action-arrow {
    transform: translateX(4px);
    color: var(--color-primary);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.quick-action-icon svg {
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.quick-action-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-action-title {
    font-weight: 600;
    color: var(--color-text);
    font-size: 1rem;
}

.quick-action-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.quick-action-arrow {
    color: var(--color-text-light);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* --- 訂閱卡片增強 --- */
.subscription-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.subscription-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.subscription-info {
    flex: 1;
}

.subscription-product {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.subscription-status {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.subscription-status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.subscription-status-trial {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.subscription-status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.subscription-details {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.subscription-detail {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.subscription-detail span {
    color: var(--color-text-light);
}

.subscription-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* --- RWD 響應式 --- */
@media (max-width: 768px) {
    .member-welcome-hero {
        padding: 2rem 1.5rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-decoration {
        width: 200px;
        height: 200px;
        top: -30%;
        right: -30%;
    }

    .empty-state-modern {
        padding: 2rem 1.5rem;
    }

    .empty-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .empty-icon {
        width: 44px;
        height: 44px;
    }

    .empty-icon-pulse {
        width: 64px;
        height: 64px;
    }

    .member-quick-actions {
        grid-template-columns: 1fr;
    }

    .quick-action-card {
        padding: 1rem 1.25rem;
    }

    .quick-action-icon {
        width: 40px;
        height: 40px;
    }

    .subscription-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .subscription-actions {
        width: 100%;
    }

    .subscription-actions .btn {
        flex: 1;
    }

    .pending-orders-banner {
        flex-direction: column;
    }

    .pending-order-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .pending-order-actions {
        width: 100%;
    }

    .pending-order-actions .btn {
        flex: 1;
    }
}
/* ========================================
   Delivery Input Form (會員填寫表單)
   ======================================== */
.delivery-input-form {
    max-width: 100%;
}

.delivery-input-form .form-control,
.delivery-input-form input[type="text"],
.delivery-input-form input[type="email"],
.delivery-input-form input[type="url"],
.delivery-input-form textarea,
.delivery-input-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.delivery-input-form .form-control:focus,
.delivery-input-form input:focus,
.delivery-input-form textarea:focus,
.delivery-input-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.delivery-input-form .form-control::placeholder,
.delivery-input-form input::placeholder,
.delivery-input-form textarea::placeholder {
    color: var(--color-text-light);
}

.delivery-input-form .required-marker {
    color: var(--color-error);
    margin-left: 0.25rem;
}

.delivery-input-form .form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.delivery-section {
    padding: 1.5rem;
}

.delivery-section .section-header {
    margin-bottom: 1.5rem;
}

.delivery-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.delivery-data-display {
    margin-top: 1.5rem;
}

.delivery-data-display .data-item {
    padding: 1rem;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.delivery-data-display .data-item-display {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.delivery-data-display .data-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.375rem;
    flex-shrink: 0;
    min-width: 120px;
}

.delivery-data-display .data-value {
    display: block;
    font-weight: 500;
    color: var(--color-text);
}

.delivery-data-display .data-value-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.delivery-data-display .data-value-secret {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.delivery-data-display .data-value-link {
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    word-break: break-all;
    transition: color 0.2s;
}

.delivery-data-display .data-value-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* 複製 / 顯示隱藏按鈕 */
.delivery-data-display .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delivery-data-display .btn-icon:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.delivery-data-display .btn-icon:active {
    transform: scale(0.95);
}

.delivery-data-display .btn-icon svg {
    width: 16px;
    height: 16px;
}

/* 複製回饋 */
.delivery-data-display .copy-feedback {
    font-size: 0.75rem;
    color: var(--color-success);
    font-weight: 500;
    white-space: nowrap;
    animation: fadeIn 0.2s ease-out;
}

.delivery-data-display .copy-feedback.hidden {
    display: none;
}

/* RWD: 行動裝置 */
@media (max-width: 768px) {
    .delivery-section {
        padding: 1rem;
    }
    
    .delivery-input-form .form-control,
    .delivery-input-form input,
    .delivery-input-form textarea,
    .delivery-input-form select {
        font-size: 16px; /* 防止 iOS 自動縮放 */
    }
    
    .delivery-section .section-title {
        font-size: 1.125rem;
    }
}

/* ========================================
   訂閱詳情頁 (Subscription Detail)
   ======================================== */

/* 頁面標題 */
.member-dashboard .page-header-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.member-dashboard .page-header-member .page-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 訂閱標題區 */
.member-dashboard .subscription-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.member-dashboard .product-info .product-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.member-dashboard .product-info .product-plan {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.member-dashboard .subscription-status-badge .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 主要 Grid 佈局 */
.member-dashboard .subscription-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

/* 卡片 - 覆蓋全局 .card 樣式 */
.member-dashboard .subscription-detail-grid .card {
    background: var(--color-bg-light);
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transform: none;
    transition: none;
}

.member-dashboard .subscription-detail-grid .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: transparent;
}

.member-dashboard .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.member-dashboard .card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.member-dashboard .card-body {
    padding: 1.5rem;
}

/* 資訊 Grid */
.member-dashboard .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.member-dashboard .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-dashboard .info-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.member-dashboard .info-value {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 500;
}

.member-dashboard .info-value-highlight {
    color: var(--color-success);
}

.member-dashboard .info-value-warning {
    color: var(--color-warning);
}

.member-dashboard .info-value-mono {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 使用說明 */
.member-dashboard .instructions-content {
    line-height: 1.8;
    color: var(--color-text-light);
}

/* 操作按鈕 */
.member-dashboard .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-dashboard .btn-block {
    width: 100%;
    justify-content: center;
}

/* 提示卡片 */
.member-dashboard .card-info {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.member-dashboard .card-info .card-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.member-dashboard .card-info p {
    margin: 0;
    color: #2c5282;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========================================
   訂單詳情頁 (Order Detail)
   ======================================== */

/* 訂單狀態徽章（標題區） */
.order-status-badge-paid {
    background: #ecfdf5;
    color: var(--color-success);
}

.order-status-badge-pending {
    background: #fffbeb;
    color: var(--color-warning);
}

.order-status-badge-cancelled {
    background: #f1f5f9;
    color: var(--color-text-muted);
}

.order-status-badge-expired {
    background: #fef2f2;
    color: var(--color-danger);
}

.order-status-badge-refunded {
    background: #eff6ff;
    color: var(--color-info);
}

/* 金額明細列表 */
.order-amount-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.order-amount-row:last-child {
    border-bottom: none;
}

.order-amount-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.order-amount-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.order-amount-discount .order-amount-value {
    color: var(--color-success);
}

.order-amount-total {
    border-top: 2px solid var(--color-border);
    border-bottom: none;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
}

.order-amount-total .order-amount-label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 1rem;
}

.order-amount-total .order-amount-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* RWD */
@media (max-width: 968px) {
    .member-dashboard .subscription-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   支援中心 (Support Ticket)
   ======================================== */

.support-page {
    max-width: 900px;
    margin: 0 auto;
}

.support-page .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.support-page .page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.support-page .page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 0;
}

.support-page .page-header .text-muted {
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

/* 篩選列 */
.support-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.support-toolbar .filters {
    flex-wrap: wrap;
}

.support-search {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.support-search .form-input {
    width: 200px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* 工單卡片 */
.ticket-list {
    display: grid;
    gap: 0.75rem;
}

.ticket-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.ticket-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.ticket-card-main {
    flex: 1;
    min-width: 0;
}

.ticket-card-subject {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.ticket-card-meta .ticket-number {
    font-family: monospace;
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.75rem;
}

.ticket-card-meta .meta-separator {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-text-light);
    flex-shrink: 0;
}

.ticket-card-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.ticket-card-arrow {
    color: var(--color-text-light);
    transition: transform 0.2s, color 0.2s;
}

.ticket-card:hover .ticket-card-arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

/* 工單狀態徽章 */
.ticket-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ticket-status-open {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ticket-status-in_progress {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ticket-status-waiting_customer {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.ticket-status-resolved {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ticket-status-closed {
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

/* 空狀態 */
.support-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.support-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--color-text-light);
    opacity: 0.5;
}

.support-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.support-empty p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* 分頁 */
.support-page .pagination-wrap {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* 返回 */
.support-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-top: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.support-page .back-link:hover {
    color: var(--color-primary);
    transform: translateX(-4px);
}

/* ========================================
   通知中心 (Notifications)
   ======================================== */

.notifications-page {
    max-width: 900px;
    margin: 0 auto;
}

.notifications-page .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.notifications-page .page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 0;
}

.notifications-page .page-header .text-muted {
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

/* 篩選工具列 */
.notification-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.notification-toolbar .filters {
    flex-wrap: wrap;
}

/* 通知列表 */
.notification-list {
    display: grid;
    gap: 0.5rem;
}

/* 載入指示器 */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.notification-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* 通知卡片 */
.notification-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.notification-card.notification-unread {
    border-left: 3px solid var(--color-primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, var(--color-bg-light) 100%);
}

.notification-card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-bg-subtle);
    color: var(--color-text-muted);
}

.notification-unread .notification-card-icon {
    background: rgba(79, 70, 229, 0.1);
    color: var(--color-primary);
}

.notification-card-icon svg {
    width: 18px;
    height: 18px;
}

.notification-card-body {
    flex: 1;
    min-width: 0;
}

.notification-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.notification-unread .notification-card-title {
    color: var(--color-primary-dark);
}

.notification-card-content {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-card-time {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.notification-card-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
    align-self: center;
}

/* ========================================
   Static Pages — Homepage, Product List, Product Detail
   ======================================== */

/* --- Hero --- */
.static-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 60%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    padding: 4rem 1.5rem;
    text-align: center;
}

.static-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.static-hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.static-hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .static-hero {
        padding: 6rem 2rem;
    }
    .static-hero-title {
        font-size: 3rem;
    }
    .static-hero-subtitle {
        font-size: 1.25rem;
    }
}

/* --- Section title --- */
.static-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .static-section-title {
        font-size: 1.75rem;
    }
}

/* --- Features --- */
.static-features {
    padding: 3rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.static-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .static-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .static-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.static-feature-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.static-feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--color-primary);
}

.static-feature-icon svg {
    width: 100%;
    height: 100%;
}

.static-feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.static-feature-card p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Featured Products --- */
.static-featured-products {
    padding: 3rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Product List --- */
.static-product-list {
    padding: 2rem 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Products Grid --- */
.static-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .static-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .static-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Product Card (static) --- */
.static-product-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-light);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.static-product-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.static-product-card .product-name {
    font-size: 1.125rem;
    margin-bottom: 0;
}

.static-product-card .product-description {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.static-product-card .price-block {
    margin-bottom: 1rem;
}

.static-product-card .product-link {
    margin-top: auto;
}

/* --- Breadcrumb --- */
.static-breadcrumb {
    padding: 1rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.static-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.static-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.25rem;
    color: var(--color-text-light);
}

.static-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.static-breadcrumb a:hover {
    text-decoration: underline;
}

.static-breadcrumb [aria-current="page"] {
    color: var(--color-text);
    font-weight: 500;
}

/* --- Product Detail --- */
.static-product-detail {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* --- Pricing (static) --- */
.static-pricing {
    margin-bottom: 1.5rem;
}

/* --- Action Section --- */
.static-action-section {
    margin-bottom: 2rem;
}

.static-action-section .trial-info {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

.notification-card-actions .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.notification-card-actions .btn-icon:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-border);
    color: var(--color-text);
}

.notification-card-actions .btn-icon-read:hover {
    color: var(--color-primary);
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.15);
}

.notification-card-actions .btn-icon-delete:hover {
    color: var(--color-error);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

.notification-card-actions .btn-icon svg {
    width: 16px;
    height: 16px;
}

/* 通知空狀態 */
.notification-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.notification-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--color-text-light);
    opacity: 0.5;
}

.notification-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.notification-empty p {
    color: var(--color-text-muted);
}

/* 分頁 */
.notifications-page .pagination-wrap {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* 返回 */
.notifications-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-top: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.notifications-page .back-link:hover {
    color: var(--color-primary);
    transform: translateX(-4px);
}

/* ========================================
   Support & Notifications RWD
   ======================================== */
@media (max-width: 768px) {
    /* Support RWD */
    .support-page .page-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .support-page .page-header-top .btn {
        width: 100%;
        justify-content: center;
    }

    .support-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .support-toolbar .filters {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .support-toolbar .filters .filter-btn {
        flex-shrink: 0;
    }

    .support-search {
        width: 100%;
    }

    .support-search .form-input {
        width: 100%;
        flex: 1;
    }

    .ticket-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .ticket-card-end {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ticket-card-arrow {
        display: none;
    }

    /* Notifications RWD */
    .notification-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-toolbar .filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .notification-toolbar .filters .filter-btn {
        flex-shrink: 0;
    }

    .notification-card {
        padding: 0.875rem 1rem;
    }

    .notification-card-icon {
        display: none;
    }

    .notification-card-actions {
        align-self: flex-start;
    }
}

/* ========================================
   取消訂閱頁面 (Cancel Subscription)
   ======================================== */
.cancel-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 0;
}

.cancel-header {
    margin-bottom: 2rem;
}

.cancel-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
}

.cancel-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.cancel-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--color-text);
}

.subscription-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.summary-row .value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.warning-box {
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.warning-box h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 0.75rem 0;
}

.warning-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warning-box li {
    font-size: 0.875rem;
    color: #78350f;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.5;
}

.warning-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-warning);
    font-weight: 700;
}

.cancel-form {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea::placeholder {
    color: var(--color-text-light);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.form-hint-warning {
    color: var(--color-warning, #d97706);
}

.form-control-plaintext {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--color-text);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-success {
    background: var(--color-success-bg, #dcfce7);
    color: var(--color-success, #16a34a);
}

.email-missing-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--color-warning-bg, #fef3c7);
    border: 1px solid var(--color-warning-border, #f59e0b);
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.875rem;
    color: var(--color-warning-text, #92400e);
}

.email-missing-banner a {
    color: var(--color-warning-text, #92400e);
    font-weight: 600;
    text-decoration: underline;
}

.checkbox-confirm {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.checkbox-confirm input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-error);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-confirm label {
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1.5;
}

.cancel-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-error) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 登出按鈕 */
.nav-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nav-link-btn:hover {
    color: var(--color-error);
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.nav-link-btn svg {
    flex-shrink: 0;
}

/* Alert 樣式 */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ========================================
   Cancel Subscription & Delivery RWD
   ======================================== */
@media (max-width: 768px) {
    .cancel-container {
        padding: 1rem 0;
    }

    .cancel-header h1 {
        font-size: 1.25rem;
    }

    .cancel-card,
    .cancel-form {
        padding: 1.25rem;
    }

    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .cancel-actions {
        flex-direction: column;
    }

    .cancel-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .warning-box {
        padding: 1.25rem;
    }

    .delivery-data-display .data-item-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .delivery-data-display .data-label {
        min-width: auto;
    }

    .delivery-data-display .data-value-wrapper {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cancel-card,
    .cancel-form,
    .warning-box {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .checkbox-confirm {
        padding: 0.75rem;
    }
}

/* ========================================
   Blog 靜態頁面樣式
   ======================================== */
.static-blog-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.static-blog-list h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.static-blog-grid {
    display: grid;
    gap: 1.5rem;
}

.static-blog-card {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.static-blog-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.static-blog-card h2 a {
    color: var(--color-text);
    text-decoration: none;
}

.static-blog-card h2 a:hover {
    color: var(--color-primary);
}

.static-blog-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.static-blog-summary {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.static-blog-link {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.static-blog-link:hover {
    text-decoration: underline;
}

/* Blog Article Detail */
.static-blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.static-blog-article h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.static-blog-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.static-blog-content {
    line-height: 1.8;
    color: var(--color-text);
}

.static-blog-content h2,
.static-blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.static-blog-content p {
    margin-bottom: 1rem;
}

.static-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.static-blog-content blockquote {
    border-left: 4px solid var(--color-primary-light);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--color-text-muted);
    font-style: italic;
}

.static-blog-content code {
    background: var(--color-bg-subtle);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.static-blog-content pre {
    background: var(--color-bg-subtle);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.static-blog-content pre code {
    background: none;
    padding: 0;
}

.static-blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}
