/* ===== TradeKit - Shared Styles ===== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text-primary, #111827); background: var(--bg, #f9fafb); padding-bottom: 52px; }

/* CSS Custom Properties */
:root {
  --bg: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --card-bg: #fff;
  --card-border: #e5e7eb;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04);
  --border-color: #e5e7eb;
  --input-bg: #fff;
  --primary: #4a0e4e;
  --primary-light: #a78bba;
  --primary-gradient: #581c87, #7e22ce;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #047857;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #dc2626;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

.dark {
  --bg: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --card-bg: #1e293b;
  --card-border: #334155;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --border-color: #475569;
  --input-bg: #0f172a;
  --primary: #a78bba;
  --primary-light: #c4b5fd;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.whitespace-nowrap { white-space: nowrap; }
.tracking-tight { letter-spacing: -0.025em; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.pt-4 { padding-top: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.overflow-x-auto { overflow-x: auto; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }
.absolute { position: absolute; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) { .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print { .no-print { display: none !important; } }

/* ===== Layout ===== */
.top-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--card-bg); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(8px); }
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.top-bar .logo { font-size: 16px; font-weight: 700; color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.top-bar .logo svg { color: #7c3aed; }
.toggle-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-primary); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
.toggle-btn:hover { background: var(--border-color); }
a.toggle-btn { text-decoration: none; }
a.toggle-btn svg { vertical-align: middle; display: inline-block; }

/* ===== Home Page ===== */
.hero { text-align: center; padding: 80px 24px 0; max-width: 1120px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 16px; background: var(--border-color); border-radius: 100px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--text-primary); margin-bottom: 12px; letter-spacing: -0.02em; line-height: 1.15; display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero p { font-size: 17px; color: var(--text-secondary); max-width: 580px; margin: 0 auto; line-height: 1.7; }
.feature-highlights { display: flex; justify-content: center; gap: 40px; margin: 56px auto; flex-wrap: wrap; max-width: 1120px; padding: 0 24px; }
.feature-item { text-align: center; }
.feature-item .feat-icon { display: flex; justify-content: center; margin-bottom: 6px; color: var(--text-secondary); }
.feature-item .feat-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.feature-item .feat-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.section-header { display: flex; align-items: baseline; margin-bottom: 20px; }
.section-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.section-header h2 span:first-child { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.section-header h2 span:last-child { font-size: 14px; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.section-count { margin-left: 12px; font-size: 12px; color: var(--text-muted); background: var(--border-color); padding: 2px 10px; border-radius: 100px; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.docs-section { max-width: 1120px; margin: 0 auto 48px; padding: 0 24px; }
.footer-note { text-align: center; margin-top: 56px; padding: 16px 0; border-top: 1px solid var(--border-color); max-width: 1120px; margin-left: auto; margin-right: auto; }
.footer-note p { font-size: 12px; color: var(--text-muted); }

/* ===== Bottom CTA Bar ===== */
.bottom-cta { position: fixed; bottom: 0; left: 0; right: 0; z-index: 49; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 24px; background: var(--card-bg); border-top: 1px solid var(--border-color); backdrop-filter: blur(8px); }
.bottom-cta .cta-btn { padding: 7px 18px; border-radius: 8px; background: linear-gradient(to right, #7c3aed, #a855f7, #ec4899); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; display: inline-block; }
.bottom-cta .cta-btn:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* ===== Doc Cards ===== */
.doc-card { background: var(--card-bg); border-radius: 14px; padding: 28px 24px 24px; border: 1px solid var(--card-border); text-align: left; transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo); box-shadow: var(--card-shadow); position: relative; overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.doc-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.doc-card-gradient { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.doc-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.doc-card-icon { transition: transform 0.25s var(--ease-out-expo); }
.doc-card-features { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.doc-card-feature-tag { font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 500; }
.doc-card-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.doc-card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.doc-card-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px; }
.doc-card-btn { padding: 7px 18px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; display: inline-block; letter-spacing: 0.01em; border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.doc-card-btn:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(0,0,0,0.15); filter: brightness(1.08); }

/* ===== Document Page ===== */
.doc-page { padding-top: 60px; min-height: 100vh; }
.doc-page-content { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.doc-header { margin-bottom: 24px; }
.doc-header h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.doc-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ===== Tabs ===== */
.tab-bar { display: flex; border-bottom: 2px solid var(--border-color); margin-bottom: 24px; }
.tab-btn { padding: 12px 24px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; background: transparent; color: var(--text-secondary); border-bottom: 2px solid transparent; transition: all 0.2s; margin-bottom: -2px; }
.tab-btn.active { background: var(--card-bg); color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--border-color); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Action Bar ===== */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.action-bar-left { display: flex; gap: 8px; align-items: center; }
.action-bar-right { display: flex; gap: 8px; align-items: center; }

/* ===== Buttons ===== */
.btn { padding: 9px 18px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.btn-primary:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); filter: brightness(1.1); }
.btn-secondary { background: var(--border-color); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--text-muted); }
.btn-danger { background: var(--card-bg); color: var(--danger-text); border: 1px solid var(--danger-border); padding: 4px 10px; font-size: 14px; line-height: 1; border-radius: 4px; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-success { background: #059669; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.btn-success:hover { background: #047857; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ===== Form ===== */
.section-card { background: var(--card-bg); border-radius: 10px; border-top: 2px solid rgba(0, 0, 0, 0.04); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04); padding: 16px; margin-bottom: 24px; transition: box-shadow 0.2s; }
@media (min-width: 768px) { .section-card { padding: 24px; } }
.section-card:hover { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04); }
.section-card h3 { font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.field-grid { display: grid; gap: 16px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; display: block; }
.form-label-cn { font-size: 11px; color: var(--text-muted); font-weight: normal; }
.input-field { border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; width: 100%; box-sizing: border-box; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s; background: var(--input-bg); font-family: inherit; color: var(--text-primary); }
.input-field::placeholder { color: var(--text-muted); }
.input-field:hover { border-color: var(--primary-light); }
.input-field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 14, 78, 0.1); }
.input-field:disabled { background: var(--border-color); color: var(--text-muted); cursor: not-allowed; }
.input-field-sm { font-size: 12px; padding: 5px 8px; border-radius: 4px; }
.input-field-xs { font-size: 11px; padding: 4px 6px; border-radius: 3px; }
textarea.input-field { resize: vertical; min-height: 70px; line-height: 1.5; }
select.input-field { cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; display: block; width: 100% !important; min-width: 0; box-sizing: border-box; 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 8px center; background-repeat: no-repeat; background-size: 16px; padding-right: 32px; }
input[type="number"].input-field { -moz-appearance: textfield; }
input[type="number"].input-field::-webkit-inner-spin-button, input[type="number"].input-field::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label { display: inline-flex; align-items: center; padding: 6px 10px; font-size: 13px; cursor: pointer; border-radius: 6px; border: 1px solid transparent; transition: all 0.15s; background: var(--border-color); }
.radio-group label:hover { background: var(--card-border); border-color: var(--border-color); }
.radio-group input[type="radio"] { margin-right: 6px; accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }

/* ===== Logo Upload ===== */
.logo-upload { margin-bottom: 16px; padding: 12px; border: 1px dashed var(--border-color); border-radius: 8px; background: var(--border-color); }
.logo-upload-label { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; display: block; }
.logo-upload-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--card-bg); color: var(--text-primary); font-size: 13px; transition: all 0.2s; }
.logo-upload-btn:hover { background: var(--border-color); }
.logo-upload-btn input { display: none; }
.logo-upload-hint { font-size: 11px; color: var(--text-muted); margin-left: 12px; }
.logo-preview-wrap { position: relative; display: inline-block; }
.logo-preview-wrap img { max-height: 48px; max-width: 120px; object-fit: contain; border-radius: 4px; }
.logo-remove { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: #dc2626; color: #fff; border: none; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 12px; }
.logo-preview-wrap:hover .logo-remove { display: flex; }

/* ===== Items Table ===== */
.items-table-container { border: 1px solid var(--border-color); border-radius: 8px; overflow-x: auto; }
.items-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.items-table input, .items-table textarea, .items-table select { box-sizing: border-box; max-width: 100%; }
.items-table thead { background: linear-gradient(to bottom, #faf5ff, #f3e8ff); position: sticky; top: 0; z-index: 1; }
.items-table thead th { padding: 8px 5px; font-weight: 600; color: #4a0e4e; text-align: center; border-bottom: 2px solid #d8b4fe; white-space: nowrap; font-size: 10px; text-transform: uppercase; letter-spacing: 0.02em; }
.items-table thead th .col-label-cn { display: block; font-size: 10px; color: #9ca3af; font-weight: normal; text-transform: none; letter-spacing: normal; margin-top: 2px; }
.items-table tbody tr { border-bottom: 1px solid #f3f4f6; transition: background-color 0.15s; }
.items-table tbody tr:hover { background-color: #fafafa; }
.items-table tbody tr:last-child { border-bottom: none; }
.items-table tbody td { padding: 4px 5px; vertical-align: middle; border: none; }
.items-table tbody td.description-cell { padding: 6px; vertical-align: top; }
.items-table tbody tr { min-height: 64px; }
.items-table tbody td.row-number { text-align: center; color: #9ca3af; font-size: 12px; font-weight: 500; background: #fafafa; width: 36px; }
.items-table tbody td.actions { text-align: center; width: 50px; }
.dark .items-table thead { background: linear-gradient(to bottom, #2e1065, #1e1b4b); }
.dark .items-table thead th { color: #c4b5fd; border-bottom-color: #5b21b6; }
.dark .items-table thead th .col-label-cn { color: #7c6fae; }
.dark .items-table tbody tr { border-bottom-color: #1e293b; }
.dark .items-table tbody tr:hover { background-color: #1e293b; }
.dark .items-table tbody td.row-number { background: #1a1f2e; color: #64748b; }

/* ===== Totals ===== */
.totals-summary { background: linear-gradient(to right, #faf5ff, #fff); border: 1px solid #e9d5ff; border-radius: 8px; padding: 16px 20px; margin-top: 16px; }
.totals-summary .summary-item { display: flex; flex-direction: column; gap: 4px; }
.totals-summary .summary-label { font-size: 12px; color: #6b7280; font-weight: 500; }
.totals-summary .summary-value { font-size: 18px; font-weight: 700; color: #4a0e4e; }
.dark .totals-summary { background: linear-gradient(to right, #1e1b4b, #0f172a); border-color: #5b21b6; }
.dark .totals-summary .summary-label { color: #94a3b8; }
.dark .totals-summary .summary-value { color: #c4b5fd; }

/* ===== Invoice Preview ===== */
.invoice-preview { font-family: 'Arial', 'Helvetica', sans-serif; font-size: 10px; color: #000; background: #fff; line-height: 1.3; padding: 24px; }
.invoice-preview table { border-collapse: collapse; width: 100%; }
.invoice-preview th, .invoice-preview td { border: 1px solid #000; padding: 4px 6px; vertical-align: top; }
.invoice-preview th { background-color: #f0f0f0; font-weight: bold; text-align: center; font-size: 9px; }
.invoice-preview .section-label { font-size: 9px; color: #111827; font-weight: 700; margin-bottom: 1px; letter-spacing: 0.03em; text-transform: uppercase; }
.section-label2 { font-size: 10px; color: #111827; font-weight: 700; margin-bottom: 5px; letter-spacing: 0.03em; text-transform: uppercase; }
.invoice-preview .section-value { font-size: 10px; min-height: 18px; word-break: break-word; }
.invoice-preview .header-title { font-size: 18px; font-weight: bold; text-align: center; margin: 8px 0; color: #4a0e4e; }
.invoice-preview .header-subtitle { font-size: 10px; text-align: center; color: #666; margin-top: -4px; margin-bottom: 8px; }

/* ===== History ===== */
.history-search { margin-bottom: 16px; }
.history-search .input-field { max-width: 320px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--card-bg); }
.history-item-info { flex: 1; }
.history-item-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.history-item-ref { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.history-item-actions { display: flex; gap: 8px; }
.history-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.history-empty svg { margin-bottom: 12px; opacity: 0.5; }

/* ===== Clear Confirmation Modal ===== */
.clear-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); }
.clear-modal-content { background: var(--card-bg); border-radius: 12px; padding: 24px; max-width: 400px; width: 90%; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.clear-modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.clear-modal-msg { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.clear-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== Utility Tool Styles ===== */
.result-card { background: var(--card-bg); border-radius: 10px; padding: 20px; border: 1px solid var(--border-color); margin-top: 16px; }
.result-value { font-size: 24px; font-weight: 700; color: var(--primary); }
.shipping-mark-preview { background: #fff; border: 2px solid #000; padding: 20px; font-family: monospace; font-size: 14px; line-height: 1.8; white-space: pre-wrap; min-height: 120px; }

/* ===== Dark Mode Overrides ===== */
.dark .btn-secondary { background: #334155; color: #e2e8f0; border-color: #475569; }
.dark .btn-secondary:hover { background: #475569; border-color: #64748b; }
.dark .btn-danger { background: #1e293b; border-color: #7f1d1d; color: #fca5a5; }
.dark .btn-danger:hover { background: #450a0a; border-color: #991b1b; }
.dark .tab-btn { color: #94a3b8; }
.dark .tab-btn.active { background: var(--card-bg); color: var(--primary-light); border-bottom-color: var(--primary); }
.dark .tab-btn:hover:not(.active) { color: #e2e8f0; background: #1e293b; }
.dark .form-label { color: #cbd5e1; }
.dark .form-label-cn { color: #64748b; }
.dark .radio-group label { background: #1e293b; color: #cbd5e1; }
.dark .radio-group label:hover { background: #334155; border-color: #475569; }
.dark .section-card { background: var(--card-bg); border-top-color: rgba(255, 255, 255, 0.06); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.dark .section-card:hover { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); }
.dark .section-card h3 { color: var(--primary); border-bottom-color: var(--border-color); }
.dark .input-field { background: var(--input-bg); color: var(--text-primary); border-color: var(--border-color); }
.dark .input-field:hover { border-color: var(--primary-light); }
.dark .input-field:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(167, 139, 186, 0.2); }
.dark select.input-field { background-color: var(--input-bg); 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='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); }
.dark .logo-upload { border-color: var(--border-color); background: var(--border-color); }
.dark .logo-upload-btn { background: var(--card-bg); border-color: var(--border-color); }
.dark .history-item { background: var(--card-bg); border-color: var(--border-color); }
.dark .clear-modal-content { background: var(--card-bg); }
.dark .shipping-mark-preview { background: #1e293b; border-color: #475569; color: #f1f5f9; }
.dark .result-card { background: var(--card-bg); border-color: var(--border-color); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 48px 16px 0; }
  .hero h1 { font-size: 28px; }
  .feature-highlights { gap: 24px; }
  .docs-grid { grid-template-columns: 1fr; }
  .doc-page-content { padding: 24px 16px; }
  .action-bar { flex-direction: column; align-items: flex-start; }
  .top-bar { padding: 12px 16px; }
}

/* ===== FAQ Section ===== */
.faq-section { margin-top: 40px; padding: 24px; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--card-border); max-width: 1120px; margin-left: auto; margin-right: auto; }
.faq-section h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.faq-question { padding: 14px 16px; font-size: 14px; font-weight: 600; color: var(--text-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); transition: background-color 0.2s; }
.faq-question:hover { background: var(--border-color); }
.faq-arrow { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; font-size: 14px; color: var(--text-secondary); line-height: 1.7; padding: 0 16px; }
.faq-item.open .faq-answer { max-height: 500px; padding: 0 16px 14px; }
@media (max-width: 768px) { .faq-section { padding: 16px; margin-top: 24px; } .faq-section h2 { font-size: 16px; } }
