/* ============================================
   Nova Theme - Clean Commerce (White & Blue)
   for dujiaoka
   ============================================ */

/* ---- Design Tokens ---- */
:root {
    --bg-base: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-muted: #f1f5f9;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-primary-light: #eff6ff;
    --accent-cyan: #0891b2;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-hover: 0 4px 12px rgba(37,99,235,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-btn: 0 2px 8px rgba(37,99,235,0.2);
    --transition: 0.2s ease;
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; }
ul, ol { list-style: none; }

/* ---- Background (Static clean) ---- */
.nova-bg {
    position: fixed; inset: 0; z-index: -1;
    background: var(--bg-base);
}
.nova-bg-orb { display: none; }

/* ---- Layout ---- */
.nova-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- Navigation ---- */
.nova-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
@media (max-width: 768px) {
    .nova-nav { background: rgba(255,255,255,0.98); }
    .nova-nav-inner { height: 54px; padding: 0 14px; }
    .nova-logo-text { font-size: 17px; }
    .nova-logo img { height: 28px; }
    .nova-nav-actions .btn-nova-sm { padding: 6px 10px; font-size: 12px; }
    .nova-nav-actions .btn-nova-sm span.btn-label { display: none; }
}
.nova-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.nova-logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nova-logo img { height: 32px; border-radius: 6px; flex-shrink: 0; }
.nova-logo-text {
    font-family: var(--font-display); font-size: 20px; font-weight: 700;
    color: var(--accent-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nova-nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* ---- Buttons ---- */
.btn-nova {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: var(--transition);
    background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    text-align: center; text-decoration: none;
    -webkit-appearance: none; appearance: none;
    -webkit-tap-highlight-color: transparent;
    vertical-align: middle; white-space: nowrap;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
}
.btn-nova:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }
.btn-nova:hover { background: var(--bg-surface-hover); border-color: var(--border-hover); }
.btn-nova:active { transform: translateY(1px); }
.btn-nova-primary {
    background: var(--accent-primary); border: 1px solid var(--accent-primary); color: #fff;
    box-shadow: var(--shadow-btn);
}
.btn-nova-primary:hover { background: var(--accent-primary-hover); border-color: var(--accent-primary-hover); transform: translateY(-1px); }
.btn-nova-danger {
    background: var(--danger); border: 1px solid var(--danger); color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,0.2);
}
.btn-nova-danger:hover { background: #b91c1c; border-color: #b91c1c; transform: translateY(-1px); }
.btn-nova-ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; }
.btn-nova-sm { padding: 6px 14px; font-size: 13px; }
.btn-nova-block { width: 100%; display: flex; }
.btn-nova:disabled { opacity: 0.65; pointer-events: none; }
.btn-nova .nova-spinner {
    display: inline-block; flex-shrink: 0;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nova-spin 0.7s linear infinite;
}
.btn-nova > span { display: inline-flex; align-items: center; line-height: 1; }
@keyframes nova-spin { to { transform: rotate(360deg); } }

/* ---- Card ---- */
.nova-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.nova-card:focus-within { border-color: rgba(37,99,235,0.35); box-shadow: 0 2px 12px rgba(37,99,235,0.08); }

/* ---- Page Title ---- */
.nova-page-title {
    font-family: var(--font-display); font-size: 22px; font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 20px; display: flex; align-items: center; gap: 10px;
}
.nova-page-title::before {
    content: ''; width: 4px; height: 22px; border-radius: 2px;
    background: var(--accent-primary);
}

/* ---- Home: Category Tabs ---- */
.nova-tabs {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nova-tabs::-webkit-scrollbar { display: none; }
.nova-tab {
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px;
    background: var(--bg-surface); border: 1px solid var(--border);
    color: var(--text-secondary); white-space: nowrap; cursor: pointer;
    transition: var(--transition); position: relative;
}
.nova-tab:hover { color: var(--text-primary); border-color: var(--border-hover); }
.nova-tab.active {
    background: var(--accent-primary); color: #fff; border-color: var(--accent-primary);
    box-shadow: var(--shadow-btn);
}

/* ---- Home: Search ---- */
.nova-search {
    position: relative; margin-bottom: 20px;
    display: flex; align-items: center;
}
.nova-search input {
    width: 100%; padding: 12px 16px 12px 44px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 16px;
    transition: var(--transition); box-shadow: var(--shadow-sm);
}
.nova-search input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.nova-search input::placeholder { color: var(--text-muted); }
.nova-search svg:first-child { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.nova-notice-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted); cursor: pointer;
    border-radius: var(--radius-sm); transition: var(--transition);
}
.nova-notice-btn:hover { color: var(--accent-primary); background: var(--accent-primary-light); }
.nova-notice-btn.pulse { animation: novaPulse 0.6s ease; }
@keyframes novaPulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.25); }
    100% { transform: translateY(-50%) scale(1); }
}
.nova-notice-btn svg { color: inherit; }

/* ---- Notice Bar ---- */
.nova-notice-bar {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 16px; padding: 14px 16px;
    background: var(--accent-primary-light);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 14px; line-height: 1.6;
    position: relative;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}
.nova-notice-bar > svg { flex-shrink: 0; margin-top: 2px; }
.nova-notice-content { flex: 1; min-width: 0; }
.nova-notice-content p { margin: 0; }
.nova-notice-close {
    flex-shrink: 0; background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 2px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.nova-notice-close:hover { color: var(--text-primary); background: rgba(0,0,0,0.05); }
.nova-notice-bar.collapsed {
    max-height: 0; opacity: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0;
    border-width: 0; pointer-events: none;
}

/* ---- Home: Product Grid ---- */
.nova-product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
    margin-bottom: 40px;
}
.nova-product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px; text-align: center;
    transition: var(--transition); position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: var(--shadow-card);
    color: inherit; text-decoration: none;
}
.nova-product-card:hover {
    border-color: rgba(37,99,235,0.3); transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.nova-product-card.out-of-stock { opacity: 0.55; cursor: not-allowed; }
.nova-product-card .stock-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 10px; border-radius: 6px; font-size: 12px;
    background: var(--danger-light); color: var(--danger); border: 1px solid rgba(220,38,38,0.2);
    line-height: 1.2;
}
.nova-product-card .stock-ok {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 10px; border-radius: 6px; font-size: 12px;
    background: var(--success-light); color: var(--success); border: 1px solid rgba(22,163,74,0.2);
    line-height: 1.2;
}
.nova-product-img {
    width: 96px; height: 96px; border-radius: var(--radius-md); object-fit: cover;
    margin-bottom: 14px; transition: var(--transition); background: var(--bg-muted);
    pointer-events: none;
}
.nova-product-card:hover .nova-product-img { transform: scale(1.05); }
.nova-product-name {
    font-size: 15px; font-weight: 500; color: var(--text-primary);
    margin-bottom: 8px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 44px; word-break: break-word;
}
.nova-product-price {
    font-family: var(--font-mono); font-size: 18px; font-weight: 700;
    color: var(--danger);
    display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.nova-product-price small { font-size: 12px; opacity: 0.7; color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.nova-product-retail {
    font-size: 12px; color: var(--text-muted); text-decoration: line-through; margin-top: 4px;
}

/* ---- Buy Page ---- */
.nova-buy-grid {
    display: grid; grid-template-columns: 1fr; gap: 20px;
}
@media (min-width: 992px) {
    .nova-buy-grid { grid-template-columns: 380px 1fr; align-items: start; }
    .nova-buy-sticky { position: sticky; top: 76px; }
}
.nova-buy-form { display: flex; flex-direction: column; gap: 20px; }
.nova-form-group { display: flex; flex-direction: column; gap: 10px; }
.nova-form-label { font-size: 15px; color: var(--text-primary); font-weight: 500; }
.nova-form-input {
    padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 16px;
    transition: var(--transition); width: 100%;
}
.nova-form-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.nova-form-input::placeholder { color: var(--text-muted); }
.nova-form-input:disabled, .nova-form-input[readonly] { background: var(--bg-muted); cursor: not-allowed; }
.nova-form-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,0.1); }
.nova-form-error { color: var(--danger); font-size: 13px; margin-top: -4px; }
.nova-form-row { display: flex; gap: 12px; }
.nova-form-row > * { flex: 1; }
.nova-amount-group { display: flex; align-items: stretch; gap: 0; }
.nova-amount-btn {
    width: 44px; height: 46px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-muted); border: 1px solid var(--border); color: var(--text-primary);
    transition: var(--transition); cursor: pointer;
}
.nova-amount-btn:hover:not(:disabled) { background: var(--border-hover); color: var(--accent-primary); }
.nova-amount-btn:active { background: var(--border); }
.nova-amount-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.nova-amount-btn.minus { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.nova-amount-btn.plus { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.nova-amount-input {
    flex: 1; height: 46px; text-align: center; border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary); font-family: var(--font-mono); font-size: 16px; font-weight: 600;
    border-left: none; border-right: none;
    -moz-appearance: textfield;
}
.nova-amount-input::-webkit-outer-spin-button, .nova-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nova-amount-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); z-index: 1; }
.nova-product-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.nova-product-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nova-badge {
    padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
    line-height: 1.4;
}
.nova-badge-primary { background: var(--accent-primary-light); color: var(--accent-primary); border: 1px solid rgba(37,99,235,0.2); }
.nova-badge-success { background: var(--success-light); color: var(--success); border: 1px solid rgba(22,163,74,0.2); }
.nova-badge-warning { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.nova-badge-danger { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(220,38,38,0.2); }
.nova-price-display { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--danger); }
.nova-price-display small { font-size: 14px; opacity: 0.5; text-decoration: line-through; margin-left: 8px; color: var(--text-muted); }

/* ---- Payment Methods ---- */
.nova-pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.nova-pay-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 10px; border-radius: var(--radius-sm); cursor: pointer;
    background: var(--bg-surface); border: 2px solid var(--border); color: var(--text-secondary);
    transition: var(--transition); font-size: 14px; font-weight: 500;
    user-select: none;
}
.nova-pay-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
.nova-pay-btn.active { border-color: var(--accent-primary); color: var(--accent-primary); background: var(--accent-primary-light); }
.nova-pay-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.nova-pay-btn span { line-height: 1; }
@media (min-width: 768px) { .nova-pay-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .nova-pay-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Wholesale Info ---- */
.nova-wholesale {
    background: var(--accent-primary-light); border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-sm); padding: 12px 16px;
}
.nova-wholesale p { font-size: 13px; color: var(--accent-primary); margin-bottom: 4px; }
.nova-wholesale p:last-child { margin-bottom: 0; }

/* ---- Bill Page ---- */
.nova-bill { max-width: 480px; margin: 0 auto; }
.nova-bill-header {
    display: flex; align-items: center; gap: 14px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.nova-bill-icon {
    width: 52px; height: 52px; border-radius: var(--radius-md); flex-shrink: 0;
    background: var(--success-light); color: var(--success);
    display: flex; align-items: center; justify-content: center;
}
.nova-bill-title h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.nova-bill-title p { font-size: 13px; color: var(--text-muted); margin: 0; }
.nova-bill-list { padding: 4px 0; }
.nova-bill-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.nova-bill-row:last-child { border-bottom: none; }
.nova-bill-row label { color: var(--text-secondary); flex-shrink: 0; }
.nova-bill-row span { color: var(--text-primary); text-align: right; word-break: break-all; }
.nova-bill-mono { font-family: var(--font-mono); font-size: 13px; }
.nova-bill-discount span { color: var(--success) !important; }
.nova-bill-summary {
    margin: 12px 0; padding: 16px 20px; background: var(--bg-muted);
    border-radius: var(--radius-md);
}
.nova-bill-total-row { border: none !important; padding: 0 !important; }
.nova-bill-total-row label { font-size: 14px; color: var(--text-secondary); }
.nova-bill-total { font-family: var(--font-mono); font-size: 24px !important; font-weight: 700; color: var(--danger) !important; }
.nova-bill-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.nova-bill-actions .btn-nova { width: 100%; display: flex; }

/* ---- QR Pay Page ---- */
.nova-qrpay { max-width: 400px; margin: 0 auto; text-align: center; }
.nova-qr-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 32px 24px; position: relative; overflow: hidden;
    box-shadow: var(--shadow-card);
}
.nova-qr-payname {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
    padding: 6px 16px; border-radius: 999px;
    background: var(--bg-muted); font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.nova-qr-payicon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
}
.nova-qr-payicon-wx { background: #dcfce7; color: #16a34a; }
.nova-qr-payicon-ali { background: #dbeafe; color: #2563eb; }
.nova-qr-payicon-default { background: var(--accent-primary-light); color: var(--accent-primary); }
.nova-countdown {
    font-family: var(--font-mono); font-size: 14px; color: var(--text-secondary); margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.nova-countdown-ring {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border); border-top-color: var(--accent-primary);
    animation: nova-spin 1s linear infinite;
}
.nova-countdown-ring.warn { border-color: var(--danger); border-top-color: var(--danger); }
.nova-countdown.expiring span { color: var(--danger); font-weight: 600; }
.nova-qr-img {
    border-radius: var(--radius-md); padding: 12px; background: #fff;
    display: inline-block; margin: 0 auto 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.nova-qr-img img { display: block; width: 200px; height: 200px; }
.nova-qr-amount { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--danger); }
.nova-qr-tip {
    font-size: 14px; color: var(--text-secondary); margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.nova-qr-tip strong { color: var(--text-primary); }
.nova-qr-tip-wx { color: #16a34a; }
.nova-qr-tip-wx strong { color: #16a34a; }
.nova-qr-tip-ali { color: #2563eb; }
.nova-qr-tip-ali strong { color: #2563eb; }
.nova-qr-subtip {
    font-size: 12px; color: var(--text-muted); margin-top: 8px;
    padding: 8px 12px; background: var(--bg-muted); border-radius: var(--radius-sm);
    display: inline-block; line-height: 1.6;
    max-width: 100%;
}
.nova-qr-jump { margin-top: 20px; display: flex; justify-content: center; }
.nova-qr-jump a {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
    border-radius: var(--radius-md); background: var(--accent-primary); color: #fff; font-size: 15px; font-weight: 500;
    box-shadow: var(--shadow-btn); transition: var(--transition);
    text-decoration: none;
}
.nova-qr-jump a:hover { background: var(--accent-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.3); }
.nova-qr-jump a:active { transform: translateY(0); }
.nova-qr-jump svg { flex-shrink: 0; }
.nova-qr-actions {
    display: flex; gap: 8px; margin-top: 28px; padding-top: 20px;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap; justify-content: center;
}
.nova-qr-actions .btn-nova { flex: 1; min-width: 0; }

/* Mobile QR: stack buttons, larger tap targets */
@media (max-width: 768px) {
    .nova-qr-card { padding: 24px 16px; }
    .nova-qr-img img { width: 180px; height: 180px; }
    .nova-qr-jump a { width: 100%; justify-content: center; padding: 14px 20px; }
}

/* ---- Order Info ---- */
.nova-order-grid { display: grid; gap: 20px; }
@media (min-width: 768px) {
    .nova-order-grid { grid-template-columns: 1fr 1.5fr; }
}
.nova-order-info p { margin-bottom: 8px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.nova-order-info label { color: var(--text-secondary); margin-right: 0; flex-shrink: 0; }
.nova-order-info span { color: var(--text-primary); word-break: break-all; }
.nova-order-status {
    display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.nova-status-expired { background: var(--bg-muted); color: var(--text-secondary); }
.nova-status-wait { background: var(--warning-light); color: var(--warning); }
.nova-status-pending { background: var(--accent-primary-light); color: var(--accent-primary); }
.nova-status-processing { background: #ecfeff; color: var(--accent-cyan); }
.nova-status-completed { background: var(--success-light); color: var(--success); }
.nova-status-failed { background: var(--danger-light); color: var(--danger); }
.nova-kami-box textarea {
    width: 100%; min-height: 120px; padding: 12px; resize: vertical;
    background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
}
.nova-kami-box textarea:focus { outline: none; border-color: var(--accent-primary); }

/* ---- Search Order ---- */
.nova-search-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.nova-search-tab {
    padding: 10px 20px; font-size: 14px; color: var(--text-secondary); cursor: pointer;
    border-bottom: 2px solid transparent; transition: var(--transition);
}
.nova-search-tab:hover { color: var(--text-primary); }
.nova-search-tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.nova-search-form { display: flex; flex-direction: column; gap: 16px; max-width: 400px; }

/* ---- Error Page ---- */
.nova-error { text-align: center; padding: 60px 20px; }
.nova-error-code {
    font-family: var(--font-display); font-size: 72px; font-weight: 800;
    color: var(--accent-primary); line-height: 1;
}
.nova-error-msg { font-size: 18px; color: var(--text-secondary); margin: 16px 0 24px; }

/* ---- Empty State ---- */
.nova-empty { text-align: center; padding: 60px 20px; }
.nova-empty h1 { font-family: var(--font-display); font-size: 48px; color: var(--text-muted); }
.nova-empty p { color: var(--text-secondary); margin: 12px 0 24px; }

/* ---- Footer ---- */
.nova-footer {
    border-top: 1px solid var(--border); margin-top: 60px; padding: 24px 0;
    text-align: center; font-size: 13px; color: var(--text-muted);
    background: var(--bg-surface);
}
.nova-footer a { color: var(--text-secondary); transition: var(--transition); }
.nova-footer a:hover { color: var(--accent-primary); }
.nova-footer-html { margin-top: 8px; }
.nova-footer-html a { margin: 0 6px; }

/* ---- Scroll behavior & sticky nav offset ---- */
html { scroll-padding-top: 80px; }
@media (max-width: 768px) {
    html { scroll-padding-top: 60px; }
    .nova-wrapper { padding: 0 14px; }
}

/* ---- Print-friendly ---- */
@media print {
    .nova-nav, .nova-back-top, .nova-footer { display: none !important; }
    .nova-bg { display: none; }
    body { background: #fff !important; }
}

/* ---- Reduced motion support ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Notification Toast ---- */
.nova-toast {
    position: fixed; top: 80px; left: 50%; transform: translate(-50%, -20px);
    padding: 12px 22px; border-radius: var(--radius-sm); font-size: 14px; z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: calc(100vw - 40px);
    text-align: center;
}
.nova-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nova-toast.info { background: var(--accent-primary); color: #fff; }
.nova-toast.success { background: var(--success); color: #fff; }
.nova-toast.warning { background: var(--warning); color: #fff; }
.nova-toast.error { background: var(--danger); color: #fff; }

/* ---- Modal ---- */
.nova-modal {
    position: fixed; inset: 0; z-index: 1000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.nova-modal.show { display: flex; }
.nova-modal-overlay { position: absolute; inset: 0; background: rgba(15,23,42,0.45); animation: modalFadeIn 0.25s ease; }
.nova-modal-content {
    position: relative; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto;
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.14);
    animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.nova-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.nova-modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text-primary); }
.nova-modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-muted); color: var(--text-secondary); transition: var(--transition); cursor: pointer; }
.nova-modal-close:hover { background: var(--border); color: var(--text-primary); }
.nova-modal-body { color: var(--text-secondary); line-height: 1.7; }
.nova-modal-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 8px 0; }
@media (max-width: 480px) {
    .nova-modal-content { padding: 20px 18px; border-radius: var(--radius-md); }
}

/* ---- Back to Top ---- */
.nova-back-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: var(--transition);
    box-shadow: var(--shadow-btn);
}
.nova-back-top.show { opacity: 1; pointer-events: auto; }
.nova-back-top:hover { background: var(--accent-primary-hover); transform: translateY(-2px); }

/* ---- Loading ---- */
.nova-loading { text-align: center; padding: 40px; color: var(--text-muted); }
.nova-spinner {
    width: 32px; height: 32px; margin: 0 auto 12px;
    border: 3px solid var(--border); border-top-color: var(--accent-primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* ---- Buy Product Description ---- */
.nova-product-desc { font-size: 14px; line-height: 1.8; color: var(--text-primary); }
.nova-product-desc img { border-radius: var(--radius-md); margin: 12px 0; }
.nova-product-desc h1, .nova-product-desc h2, .nova-product-desc h3 { margin: 20px 0 10px; color: var(--text-primary); }

/* ---- Captcha ---- */
.nova-captcha-group { display: flex; gap: 8px; }
.nova-captcha-group input { flex: 1; }
.nova-captcha-img { height: 44px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border); }
.nova-geetest-loading { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.nova-fade-in { animation: fadeInUp 0.4s ease forwards; }
.nova-fade-in-delay-1 { animation-delay: 0.08s; opacity: 0; }
.nova-fade-in-delay-2 { animation-delay: 0.16s; opacity: 0; }
.nova-fade-in-delay-3 { animation-delay: 0.24s; opacity: 0; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .nova-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .nova-product-card { padding: 14px; }
    .nova-product-img { width: 72px; height: 72px; }
    .nova-product-name { font-size: 13px; min-height: 38px; line-height: 1.4; }
    .nova-product-price { font-size: 15px; }
    .nova-product-retail { font-size: 11px; }
    .nova-page-title { font-size: 18px; margin: 16px 0 14px; }
    .nova-pay-grid { grid-template-columns: repeat(2, 1fr); }
    .nova-pay-btn { padding: 10px 8px; font-size: 13px; }
    .nova-pay-btn svg { width: 20px; height: 20px; }
    .nova-order-grid { grid-template-columns: 1fr; }
    .nova-card { padding: 18px; border-radius: var(--radius-md); }
    .nova-captcha-img { height: 42px; }
    .nova-form-input, .nova-amount-input { font-size: 16px; } /* prevent iOS zoom */
    .nova-toast { top: auto; bottom: 24px; left: 50%; transform: translate(-50%, 10px); }
    .nova-toast.show { transform: translate(-50%, 0); }
    .nova-bill-row { gap: 8px; font-size: 13px; }
    .nova-bill-mono { font-size: 12px; }
    .nova-price-display { font-size: 24px; }
    .nova-search input { padding: 10px 14px 10px 40px; font-size: 15px; }
    .nova-search svg:first-child { left: 12px; }
}
@media (max-width: 400px) {
    .nova-product-grid { grid-template-columns: 1fr; }
}
