/* 全局設置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #333;
    overflow-x: hidden;
}

/* 移動應用容器 - 桌面端增強 */
.mobile-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    /* Desktop enhancements */
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    body {
        background-color: #f0f2f5; /* Desktop background */
    }
    
    .mobile-app {
        max-width: 1200px;
        background: #ffffff;
        box-shadow: 0 0 40px rgba(0,0,0,0.05);
        min-height: 100vh;
    }

    /* Header adjustments for desktop */
    .mobile-header {
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        justify-content: center; /* Centered logo looks good */
    }

    .logo-area {
        flex-direction: row;
        gap: 1rem;
    }
    
    .logo-area .logo {
        width: 64px;
        height: 64px;
    }
    
    .logo-area h1 {
        font-size: 2rem;
    }
    
    .logo-area p {
        font-size: 1.1rem;
        text-align: left;
        margin-top: 4px;
    }
    
    /* Text alignment fix for flex row */
    .logo-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Reset footer padding on desktop */
    .site-footer {
        padding-bottom: 2rem;
    }
}

/* 頂部Logo區 */
.mobile-header {
    position: relative; /* Ensure absolute children are positioned relative to header */
    background: #ffffff;
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

/* Stock Disabled State */
.stock-disabled {
    background-color: #cccccc !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important; /* Allow click events for the prompt */
    box-shadow: none !important;
    transform: none !important;
}

/* Ensure buttons stick to bottom in flex card */
.offer-card .buy-btn-main, 
.offer-card .action-row {
    margin-top: auto;
}

.offer-card .offer-features {
    margin-bottom: 1.5rem; /* Ensure space before button */
    flex-grow: 1; /* Allow features to take available space */
}

/* 頂部Logo區 - 讓各頁可覆蓋 */
.logo-area .logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ff6b35;
  object-fit: cover;
}
@media (min-width: 768px) {
  .mobile-header { padding: 1rem; }
  .logo-area .logo { width: 80px; height: 80px; }
}
.logo-area h1 {
    margin: 0;
    font-size: 1.35rem; /* 原 1.5rem，輕微下調以避免喧賓奪主 */
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (min-width: 768px) {
  .logo-area h1 { font-size: 1.6rem; }
}

.logo-area p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* 優惠展示區 */
.offers-section {
    flex: 1;
    padding: 1rem;
    background: #f8f9fa;
}

/* Desktop Grid Layout for Offers */
@media (min-width: 768px) {
    .offers-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 2rem;
        align-content: start; /* Prevent stretching if content is short */
    }

    /* Make the offers-grid (small cards) span full width */
    .offers-section > .offers-grid {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .offer-card {
        margin-bottom: 0; /* Remove bottom margin in grid */
        height: 100%;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .offer-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    }
}

.offer-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem; /* Increased padding for better look */
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* Softer shadow */
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.offer-card.featured {
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.offer-badge {
    position: absolute;
    top: -5px;
    right: 10px;
    background: #ff4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.8rem;
    font-weight: bold;
}

.offer-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    font-weight: bold;
}

.offer-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff6b35;
}

.offer-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 2rem;
    font-weight: bold;
}

.original-price {
    font-size: 1rem;
    text-decoration: line-through;
    opacity: 0.8;
}

.discount {
    background: #ff4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.offer-features {
    margin-bottom: 1rem;
}

.feature {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.offers-grid .offer-card {
    text-align: center;
    padding: 1rem 0.5rem;
}

.offer-icon {
    font-size: 2rem;
    margin-top: 0.5rem;
}

/* 跑馬燈效果按鈕 */
.buy-btn-main {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg,#ff6b35 0%,#ff8c42 50%,#ffa726 100%);
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(255,107,53,0.35);
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
}

.buy-btn-main .btn-glow {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: btnShine 2.6s infinite;
}

/* 可重用：與 buy-btn-main 視覺一致的走馬燈按鈕，不強制 100% 寬度，方便橫向排列 */
.btn-glow-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg,#ff6b35 0%,#ff8c42 50%,#ffa726 100%);
    box-shadow: 0 8px 24px rgba(255,107,53,0.35);
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
}

.btn-glow-primary .btn-glow {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: btnShine 2.6s infinite;
}

/* 卡片操作區：放置次要操作按鈕（如 CBONTop 入口） */
.offer-card .action-row {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
}

.offer-card .action-row .btn-glow-primary {
    width: 100%;
    max-width: 420px;
}

.btn-glow-primary:focus-visible {
    outline: 2px solid rgba(255,255,255,0.9);
    outline-offset: 2px;
}

.btn-glow-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg,#ff6b35 0%,#ff8c42 50%,#ffa726 100%);
    box-shadow: 0 8px 24px rgba(255,107,53,0.35);
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
}

.btn-glow-icon .btn-glow {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: btnShine 2.6s infinite;
}

@keyframes btnShine {
    0% { left: -40%; }
    60% { left: 120%; }
    100% { left: 120%; }
}

/* =========================================
   Theme Configuration (3 Schemes)
   ========================================= */

/* Scheme A: Modern Brand (Default) */
:root {
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-backdrop: blur(10px);
    --nav-border: 1px solid rgba(0,0,0,0.05);
    --nav-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    --nav-item-color: #94a3b8;
    --nav-item-active-color: #ff6b35;
    --nav-item-bg-hover: rgba(255, 107, 53, 0.08);
    --nav-item-indicator: #ff6b35;
}

/* Scheme B: Dark Elegant (Night Mode) - Uncomment to activate */
/*
:root {
    --nav-bg: rgba(15, 23, 42, 0.95);
    --nav-backdrop: blur(10px);
    --nav-border: 1px solid rgba(255,255,255,0.05);
    --nav-shadow: 0 -5px 20px rgba(0,0,0,0.3);
    --nav-item-color: #64748b;
    --nav-item-active-color: #ff6b35;
    --nav-item-bg-hover: rgba(255, 107, 53, 0.1);
    --nav-item-indicator: #ff6b35;
}
*/

/* Scheme C: Soft Minimalist - Uncomment to activate */
/*
:root {
    --nav-bg: #f8f9fa;
    --nav-backdrop: none;
    --nav-border: none;
    --nav-shadow: 0 -10px 40px rgba(0,0,0,0.03);
    --nav-item-color: #64748b;
    --nav-item-active-color: #ff6b35;
    --nav-item-bg-hover: #ffffff;
    --nav-item-indicator: #ff6b35;
}
*/

/* 底部導航 - Modern Link Patterns */
.bottom-nav-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-backdrop);
    -webkit-backdrop-filter: var(--nav-backdrop);
    border-top: var(--nav-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.5rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    box-shadow: var(--nav-shadow);
    z-index: 1000;
    font-size: 0;
}

.nav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--nav-item-color);
    padding: 0.5rem 0.25rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 64px;
    flex: 1;
    max-width: 80px;
    font-size: 1rem;
    /* Accessibility */
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Icons */
.nav-btn i, .nav-btn img, .nav-btn svg {
    font-size: 1.5rem;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
    fill: currentColor; /* For SVGs */
}

/* Text */
.nav-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.9;
    white-space: nowrap;
}

/* Hover State - CSS3 Animation */
.nav-btn:hover {
    color: var(--nav-item-active-color);
    background: var(--nav-item-bg-hover);
    transform: translateY(-3px);
}

.nav-btn:hover i, .nav-btn:hover svg {
    transform: scale(1.1);
}

/* Active/Current State */
.nav-btn.active {
    color: var(--nav-item-active-color);
    font-weight: 600;
    background: var(--nav-item-bg-hover); /* Optional: Keep highlight for active */
}

/* Click Feedback */
.nav-btn:active {
    transform: scale(0.95);
}

/* Focus for Accessibility */
.nav-btn:focus-visible {
    outline: 2px solid var(--nav-item-active-color);
    outline-offset: -2px;
}

/* 購買頁面樣式 */
.buy-section {
    flex: 1;
    padding: 16px;
    background: #f8f9fa;
    padding-bottom: 96px; /* 避開底部導航 */
}

.purchase-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.purchase-header h2 {
    margin: 8px 0 6px;
    font-size: 1.2rem;
}

.purchase-desc {
    color: #666;
    font-size: 0.9rem;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(255,167,38,0.15));
    color: #ff6b35;
    border: 1px solid rgba(255,107,53,0.35);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.purchase-action {
    margin: 16px 0 8px;
}

.status-message {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-top: 10px;
}

.status-icon {
    font-size: 1.4rem;
    color: #ff6b35;
    margin-bottom: 6px;
}

.purchase-tips {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

/* 返回按鈕 */
.back-btn-mobile {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #555;
    text-decoration: none;
    background: rgba(0,0,0,0.04);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.back-btn-mobile:hover {
    background: rgba(0,0,0,0.08);
}

/* 響應式優化 - 為底部導航留出空間，避免內容被遮蓋 */
@media (max-width: 768px) {
    .offers-section {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }
    
    /* 縮短主要按鈕與下方卡片的距離 */
    .offer-card.featured {
        margin-bottom: 0.5rem;
    }
    
    /* 緊湊排版：減少網格間距 */
    .offers-grid {
        gap: 0.8rem;
        margin-top: 0.5rem;
    }
}

/* 顯示控制：手機直屏 vs 桌面版 */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .mobile-only {
        display: none !important;
    }
    .desktop-only {
        display: block !important;
    }
}

/* 公司資訊 Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 16px 16px 84px; /* 底部留白避免被固定導航遮擋 */
    color: #444;
}

.footer-container {
    max-width: 1024px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1rem;
    font-weight: 800;
    color: #ff6b35;
    margin-bottom: 8px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.6;
    font-size: 0.95rem; /* 與整站字體相協調 */
}

.footer-list strong {
    color: #333;
}

@media (min-width: 640px) {
    .footer-list {
        gap: 8px;
    }
    .footer-list li {
        font-size: 1rem;
    }
}

/* Codes Page Styles (Added for consistency) */
.codes-section {
    padding: 1rem;
    flex: 1;
}

.codes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .codes-section {
        padding: 2rem;
    }
    
    .codes-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

.code-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
    .code-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    }
}

.code-card .card-header {
    margin-bottom: 1rem;
    text-align: center;
}

.code-card .card-body {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.code-card .card-action {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-card .thumb-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* Unified Sitemap / Portal Pages */
.site-nav-shell {
    padding: 12px 16px 0;
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.site-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: #334155;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 107, 53, 0.35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    outline: none;
}

.site-nav-link.active,
.site-nav-link.featured {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    box-shadow: 0 12px 26px rgba(255, 107, 53, 0.24);
}

.portal-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 28px 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b35 0%, #fb923c 100%);
    box-shadow: 0 18px 42px rgba(255, 107, 53, 0.2);
}

.portal-hero::before,
.portal-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.portal-hero::before {
    width: 180px;
    height: 180px;
    top: -85px;
    right: -45px;
}

.portal-hero::after {
    width: 130px;
    height: 130px;
    left: -35px;
    bottom: -45px;
}

.portal-hero.theme-game {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
}

.portal-hero.theme-promotions {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
}

.portal-hero.theme-guide {
    background: linear-gradient(135deg, #0f766e 0%, #06b6d4 100%);
}

.portal-hero.theme-orders {
    background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
}

.portal-hero.theme-contact {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
}

.portal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.portal-hero h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.portal-hero p {
    margin: 12px 0 0;
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.portal-grid,
.portal-mini-grid {
    display: grid;
    gap: 16px;
}

.portal-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-card,
.portal-mini-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    text-decoration: none;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-card:hover,
.portal-card:focus-visible,
.portal-mini-card:hover,
.portal-mini-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    border-color: rgba(255, 107, 53, 0.32);
    outline: none;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.1);
    color: #c2410c;
    font-size: 0.78rem;
    font-weight: 800;
}

.portal-card h3,
.portal-mini-card h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.portal-card p,
.portal-mini-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    font-size: 0.94rem;
}

.portal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: #475569;
    font-size: 0.92rem;
}

.portal-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.portal-list li i {
    color: #ff6b35;
    margin-top: 2px;
}

.portal-section {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 26px;
    padding: 22px 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.portal-section h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: #0f172a;
}

.portal-section p {
    margin: 0 0 16px;
    color: #64748b;
    line-height: 1.7;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 999px;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b35 0%, #ffa726 100%);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(255, 107, 53, 0.24);
}

.portal-action.secondary {
    color: #334155;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

.portal-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 247, 237, 0.95);
    color: #9a3412;
    font-size: 0.92rem;
    line-height: 1.6;
    border: 1px solid rgba(254, 215, 170, 0.75);
}



.dashboard-grid,
.live-grid,
.member-shell,
.order-columns,
.member-stats,
.order-meta-grid {
    display: grid;
    gap: 16px;
}

.dashboard-grid,
.member-stats,
.order-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.live-grid,
.member-shell,
.order-columns {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.metric-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.metric-value {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1;
    font-weight: 900;
}

.metric-meta {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.member-surface,
.live-panel,
.order-section-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.member-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.member-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 107, 53, 0.24);
    background: #fff7ed;
}

.member-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.member-email {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.92rem;
    word-break: break-word;
}

.member-stat {
    padding: 15px 16px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid rgba(254, 215, 170, 0.75);
}

.member-stat span,
.meta-pair span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a3412;
}

.member-stat strong,
.meta-pair strong {
    display: block;
    font-size: 1.3rem;
    line-height: 1.1;
    color: #0f172a;
}

.member-stat small,
.meta-pair small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    line-height: 1.5;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.section-head h3 {
    margin: 0;
    color: #0f172a;
}

.section-head p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 0.92rem;
}

.section-link,
.link-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
}

.section-link {
    color: #ea580c;
}

.link-ghost {
    color: #475569;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 8px 12px;
    border-radius: 999px;
}

.record-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.record-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
}

.record-subtitle,
.record-meta {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.record-trailing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
}

.record-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.record-value.positive {
    color: #16a34a;
}

.record-value.negative {
    color: #dc2626;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-chip.success {
    background: #dcfce7;
    color: #166534;
}

.status-chip.warning {
    background: #fef3c7;
    color: #b45309;
}

.status-chip.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.status-chip.neutral {
    background: #e2e8f0;
    color: #334155;
}

.coupon-code,
.code-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 11px;
    border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.4;
    background: #fff7ed;
    color: #c2410c;
    border: 1px dashed #fdba74;
    cursor: pointer;
    word-break: break-all;
}

.meta-pair {
    padding: 14px 15px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.info-strip {
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.inline-note,
.empty-block,
.loading-block,
.delivery-box {
    padding: 15px 16px;
    border-radius: 18px;
    line-height: 1.65;
    font-size: 0.92rem;
}

.inline-note,
.delivery-box {
    background: #fff7ed;
    border: 1px solid rgba(254, 215, 170, 0.8);
    color: #9a3412;
}

.empty-block,
.loading-block {
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed rgba(148, 163, 184, 0.34);
}

.loading-block i,
.empty-block i {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.delivery-box strong {
    color: #0f172a;
}

.delivery-box .code-pill,
.delivery-box .coupon-code {
    margin-top: 10px;
}

@media (min-width: 768px) {
    .site-nav-shell {
        padding: 18px 24px 0;
    }

    .portal-page {
        padding: 24px 24px 48px;
    }

    .portal-hero,
    .portal-section {
        padding: 28px 24px;
    }
}

@media (max-width: 767px) {
    .site-nav-link {
        font-size: 0.88rem;
    }

    .portal-card,
    .portal-mini-card {
        border-radius: 18px;
    }

    .record-item,
    .member-user {
        flex-direction: column;
        align-items: flex-start;
    }

    .record-trailing {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

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

    .member-actions .portal-action,
    .member-actions .link-ghost {
        width: 100%;
        justify-content: center;
    }
}
