:root {
    --ink: #111820;
    --ink-2: #1b2632;
    --paper: #f4f5f3;
    --white: #ffffff;
    --muted: #77808b;
    --line: #e3e6e8;
    --orange: #f05a22;
    --orange-dark: #d8440f;
    --orange-soft: #fff0e9;
    --green: #198754;
    --blue: #2574d8;
    --red: #d94a4a;
    --amber: #ad7215;
    --shadow: 0 14px 34px rgba(20, 27, 34, .09);
    --radius: 18px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.mobile-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: #f7f7f5; position: relative; padding-bottom: calc(78px + env(safe-area-inset-bottom)); box-shadow: 0 0 80px rgba(17, 24, 32, .06); }
.mobile-header { height: 60px; padding: 8px 18px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; position: sticky; top: 0; z-index: 30; background: rgba(247, 247, 245, .92); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(225, 228, 230, .7); }
.mobile-header h1 { margin: 0; text-align: center; font-size: 17px; letter-spacing: .02em; }
.brand-mini { display: flex; align-items: center; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--orange); color: #fff; font-size: 22px; font-weight: 900; font-style: italic; box-shadow: 0 8px 18px rgba(240,90,34,.25); transform: skew(-5deg); }
.icon-button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 34px; line-height: 1; text-align: left; color: var(--ink); padding: 0; }
.header-side { min-width: 54px; display: flex; justify-content: flex-end; }
.points-pill { display: flex; gap: 5px; align-items: baseline; color: var(--orange); font-weight: 800; font-size: 13px; white-space: nowrap; }
.points-pill span { color: var(--muted); font-size: 10px; font-weight: 600; }
.mobile-content { padding: 0 16px 24px; }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 40; width: min(100%, 520px); height: calc(66px + env(safe-area-inset-bottom)); padding: 8px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.94); backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
.bottom-nav a { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; color: #89919a; font-weight: 600; }
.bottom-nav a.active { color: var(--orange); }
.nav-icon { font-size: 23px; line-height: 1; font-family: Georgia, serif; }

.hero { margin: 10px 0 16px; border-radius: 24px; overflow: hidden; background: var(--ink); color: #fff; position: relative; padding: 24px; min-height: 190px; box-shadow: var(--shadow); }
.hero:before { content: ''; position: absolute; width: 240px; height: 240px; border: 40px solid rgba(255,255,255,.045); border-radius: 50%; right: -90px; top: -92px; }
.hero:after { content: ''; position: absolute; width: 120px; height: 6px; background: var(--orange); transform: skewX(-28deg); right: 25px; bottom: 25px; box-shadow: 28px -16px 0 rgba(240,90,34,.35); }
.eyebrow { text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #ff9d77; margin-bottom: 13px; }
.hero h2 { font-size: 22px; margin: 0 0 5px; position: relative; z-index: 1; }
.hero-copy { margin: 0; color: #aeb9c4; font-size: 13px; }
.hero-balance { display: flex; align-items: baseline; gap: 7px; margin-top: 18px; position: relative; z-index: 1; }
.hero-balance strong { font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.hero-balance span { font-size: 13px; color: #d9e0e6; }
.ratio-badge { margin-top: 12px; display: inline-flex; gap: 7px; align-items: center; font-size: 11px; color: #c8d1d9; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 6px 10px; }
.ratio-badge i { width: 6px; height: 6px; background: #4dda88; border-radius: 50%; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 22px; }
.quick-item { text-align: center; font-size: 12px; font-weight: 650; color: #4d5660; }
.quick-icon { width: 48px; height: 48px; border-radius: 15px; margin: 0 auto 7px; display: grid; place-items: center; background: #fff; border: 1px solid #ebecea; box-shadow: 0 7px 18px rgba(20,27,34,.05); font-size: 17px; font-weight: 900; color: var(--orange); }
.quick-item:nth-child(2) .quick-icon { color: var(--blue); }
.quick-item:nth-child(3) .quick-icon { color: var(--green); }
.quick-item:nth-child(4) .quick-icon { color: var(--amber); }

.section { margin: 20px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.section-heading a { color: var(--orange); font-size: 12px; font-weight: 700; }
.notice-bar { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 11px 14px; font-size: 12px; color: #59616a; margin: 13px 0; border: 1px solid #eceeea; }
.notice-bar strong { color: var(--orange); font-size: 10px; letter-spacing: .05em; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid #e9ebe9; box-shadow: 0 8px 22px rgba(20,27,34,.045); transition: transform .18s ease; }
.product-card:active { transform: scale(.98); }
.product-image { height: 132px; background: linear-gradient(145deg, #202c38, #0f151b); position: relative; display: grid; place-items: center; background-size: cover; background-position: center; overflow: hidden; }
.product-image:after { content: ''; position: absolute; width: 90px; height: 90px; border: 15px solid rgba(255,255,255,.05); border-radius: 50%; right: -24px; bottom: -30px; }
.product-image.has-image:before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,14,18,.35), transparent 65%); }
.product-code { color: rgba(255,255,255,.82); font-size: 27px; font-weight: 900; font-style: italic; letter-spacing: -.06em; z-index: 1; }
.product-tag { position: absolute; z-index: 2; left: 9px; top: 9px; border-radius: 7px; background: var(--orange); color: #fff; font-size: 9px; font-weight: 800; padding: 5px 7px; }
.product-info { padding: 12px; }
.product-info h3 { font-size: 14px; margin: 0 0 6px; line-height: 1.45; min-height: 40px; }
.product-info > p { color: var(--muted); font-size: 10px; margin: 0 0 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.product-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.product-price strong { color: var(--orange); font-size: 18px; letter-spacing: -.03em; }
.product-price strong small { font-size: 10px; margin-left: 2px; }
.product-price span { color: #a6adb4; font-size: 9px; }

.filter-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; border: 1px solid var(--line); background: #fff; color: #606973; border-radius: 999px; padding: 8px 13px; font-size: 12px; }
.filter-chip.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.search-box { display: flex; gap: 8px; margin: 10px 0 12px; }
.search-box input { flex: 1; min-width: 0; border: 1px solid #e2e5e7; background: #fff; border-radius: 14px; height: 44px; padding: 0 14px; outline: 0; }
.search-box input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.search-box button { border: 0; background: var(--ink); color: #fff; border-radius: 13px; padding: 0 16px; font-size: 12px; font-weight: 700; }

.detail-image { height: 260px; margin: 0 -16px; background: linear-gradient(140deg,#253240,#0d1319); display: grid; place-items: center; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.detail-image:before { content:''; width: 220px; height: 220px; border: 36px solid rgba(255,255,255,.05); border-radius:50%; position:absolute; right:-70px; top:-80px; }
.detail-image .product-code { font-size: 56px; }
.detail-panel { background: #fff; border-radius: 24px 24px 0 0; margin: -24px -8px 0; padding: 22px 16px; position: relative; z-index: 2; }
.detail-panel h2 { font-size: 22px; margin: 0 0 8px; }
.detail-panel .subtitle { color: var(--muted); margin: 0 0 15px; font-size: 13px; }
.detail-price { display: flex; align-items: baseline; gap: 8px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.detail-price strong { font-size: 30px; color: var(--orange); }
.detail-price span { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.service-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.service-meta div { background: #f5f6f4; border-radius: 13px; padding: 12px; }
.service-meta small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.service-meta strong { font-size: 12px; }
.description { font-size: 13px; color: #565f68; line-height: 1.8; white-space: pre-line; }
.attribute-table { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fafaf9; }
.attribute-table > div { display: grid; grid-template-columns: 34% 1fr; min-height: 44px; border-bottom: 1px solid var(--line); align-items: center; font-size: 12px; }
.attribute-table > div:last-child { border-bottom: 0; }
.attribute-table span { color: var(--muted); padding: 11px 13px; background: #f4f5f3; align-self: stretch; display: flex; align-items: center; }
.attribute-table strong { padding: 11px 13px; font-weight: 650; }
.sticky-action { position: sticky; bottom: 74px; z-index: 20; display: flex; gap: 10px; background: rgba(247,247,245,.92); backdrop-filter: blur(12px); margin: 22px -8px -12px; padding: 12px 8px; }
.sticky-action .btn { flex: 1; }

.card { background: #fff; border: 1px solid #e7e9e8; border-radius: var(--radius); padding: 16px; box-shadow: 0 8px 24px rgba(20,27,34,.04); }
.card + .card { margin-top: 12px; }
.form-card { margin: 10px 0 18px; }
.form-section-title { font-size: 13px; margin: 3px 0 15px; color: #343c44; display: flex; gap: 8px; align-items: center; }
.form-section-title:before { content: ''; width: 4px; height: 15px; background: var(--orange); border-radius: 2px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: flex; justify-content: space-between; font-size: 12px; color: #59626b; margin-bottom: 7px; font-weight: 650; }
.form-group label small { color: #9aa1a7; font-weight: 400; }
.input, .select, .textarea { width: 100%; border: 1px solid #dfe3e5; border-radius: 12px; background: #fbfbfa; color: var(--ink); padding: 11px 12px; outline: 0; transition: .15s; }
.input { height: 45px; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px var(--orange-soft); }
.input[readonly] { background: #f1f3f3; color: #7c858d; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 58px; }
.password-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; border: 0; color: var(--orange); background: transparent; font-size: 11px; font-weight: 700; }
.help-text { color: var(--muted); font-size: 10px; line-height: 1.6; margin-top: 6px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.region-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { display: block; text-align: center; border: 1px solid var(--line); border-radius: 11px; padding: 11px 5px; font-size: 12px; background: #fff; }
.radio-card input:checked + span { color: var(--orange); border-color: var(--orange); background: var(--orange-soft); font-weight: 700; }
.quantity { display: flex; height: 42px; width: 126px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.quantity button { width: 38px; border: 0; background: #f4f5f4; font-size: 18px; }
.quantity input { min-width: 0; width: 48px; border: 0; text-align: center; outline: 0; }
.btn { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 0; border-radius: 13px; padding: 0 18px; font-size: 13px; font-weight: 750; transition: transform .15s, background .15s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 22px rgba(240,90,34,.22); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #f0f2f2; color: #3f4851; }
.btn-danger { background: #feecec; color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 11px; }
.balance-check { display: flex; justify-content: space-between; align-items: center; background: #f7f4f0; border-radius: 12px; padding: 12px; font-size: 12px; margin-bottom: 15px; }
.balance-check strong { color: var(--orange); font-size: 18px; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px dashed var(--line); }
.checkout-total strong { color: var(--orange); font-size: 24px; }

.auth-page { background: var(--ink); }
.auth-wrap { width: min(100%, 440px); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 34px 24px; position: relative; overflow: hidden; color: #fff; }
.auth-wrap:before { content: ''; width: 360px; height: 360px; border: 65px solid rgba(255,255,255,.025); position: absolute; right: -160px; top: -100px; border-radius: 50%; }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 44px; position: relative; }
.auth-brand .brand-mark { width: 48px; height: 48px; font-size: 28px; border-radius: 13px; }
.auth-brand strong { display: block; font-size: 19px; }
.auth-brand small { display: block; color: #81909e; margin-top: 3px; letter-spacing: .08em; font-size: 9px; }
.auth-intro { margin-bottom: 23px; }
.auth-intro .eyebrow { margin-bottom: 9px; }
.auth-intro h1 { font-size: 29px; margin: 0 0 8px; letter-spacing: -.04em; }
.auth-intro p { color: #93a0ac; margin: 0; font-size: 12px; line-height: 1.7; }
.auth-card { background: #fff; color: var(--ink); border-radius: 24px; padding: 22px; box-shadow: 0 25px 70px rgba(0,0,0,.28); position: relative; }
.auth-card .input { background: #f4f5f4; border-color: transparent; }
.auth-card .input:focus { background: #fff; border-color: var(--orange); }
.auth-foot { text-align: center; color: #71808d; font-size: 10px; margin-top: 22px; }

.onboarding-steps { display: flex; gap: 5px; margin: 8px 0 22px; }
.onboarding-steps span { height: 4px; flex: 1; background: #dfe2e3; border-radius: 2px; }
.onboarding-steps span.active { background: var(--orange); }
.security-note { background: #eef6f1; color: #3e5d4a; border-radius: 12px; padding: 11px; font-size: 11px; line-height: 1.6; margin-bottom: 16px; }

.list-card { background: #fff; border: 1px solid #e7e9e8; border-radius: var(--radius); padding: 14px; margin-bottom: 11px; }
.order-head, .list-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-bottom: 11px; border-bottom: 1px solid #edf0f0; font-size: 10px; color: var(--muted); }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 700; background: #eff1f1; color: #5b646d; }
.status-badge.success { color: var(--green); background: #eaf7f0; }
.status-badge.danger { color: var(--red); background: #fdeeee; }
.status-badge.info { color: var(--blue); background: #eaf2fd; }
.status-badge.warning { color: var(--amber); background: #fff4df; }
.order-product { display: grid; grid-template-columns: 64px 1fr auto; gap: 11px; align-items: center; padding: 13px 0; }
.order-thumb { width: 64px; height: 64px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); background-size: cover; background-position: center; color: #fff; font-size: 14px; font-weight: 900; font-style: italic; }
.order-product h3 { font-size: 13px; margin: 0 0 5px; }
.order-product p { color: var(--muted); margin: 0; font-size: 10px; }
.order-product > strong { font-size: 13px; color: var(--orange); }
.order-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 11px; }
.order-foot strong { font-size: 16px; }
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state .empty-icon { width: 72px; height: 72px; margin: 0 auto 15px; border-radius: 24px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--orange); font-size: 27px; }
.empty-state h3 { color: var(--ink); margin: 0 0 7px; font-size: 16px; }
.empty-state p { margin: 0 0 18px; font-size: 12px; }

.wallet-card { background: linear-gradient(145deg, var(--ink-2), #0d141a); color: #fff; border-radius: 22px; padding: 22px; margin: 10px 0 17px; position: relative; overflow: hidden; }
.wallet-card:after { content: '1:1'; position: absolute; right: -5px; bottom: -18px; font-size: 76px; font-weight: 900; color: rgba(255,255,255,.035); }
.wallet-card small { color: #93a0ac; font-size: 11px; }
.wallet-card strong { display: block; font-size: 36px; margin: 8px 0 13px; }
.wallet-card p { margin: 0; color: #c1cad2; font-size: 11px; }
.log-item { display: grid; grid-template-columns: 39px 1fr auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #edf0ef; }
.log-item:last-child { border: 0; }
.log-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #edf7f1; color: var(--green); font-weight: 800; }
.log-icon.out { background: #fff0e9; color: var(--orange); }
.log-main strong { display: block; font-size: 12px; margin-bottom: 4px; }
.log-main small { color: var(--muted); font-size: 9px; }
.log-amount { text-align: right; font-size: 14px; font-weight: 800; color: var(--green); }
.log-amount.out { color: var(--ink); }
.log-amount small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 4px; }

.profile-hero { background: var(--ink); color: #fff; margin: 10px 0 15px; border-radius: 22px; padding: 22px; display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--orange); color: #fff; font-size: 21px; font-weight: 900; }
.profile-hero h2 { margin: 0 0 5px; font-size: 18px; }
.profile-hero p { margin: 0; color: #9eabb6; font-size: 11px; }
.cart-item { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf0ef; }
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 78px; height: 78px; border-radius: 15px; display: grid; place-items: center; background: var(--ink); background-size: cover; background-position: center; color: #fff; font-size: 14px; font-weight: 900; font-style: italic; }
.cart-main h3 { font-size: 13px; margin: 0 0 5px; }
.cart-main > p { margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.cart-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cart-controls strong { color: var(--orange); font-size: 16px; }
.cart-actions { display: flex; gap: 6px; align-items: center; }
.cart-actions form { margin: 0; }
.cart-summary { position: sticky; bottom: 75px; z-index: 20; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; margin-top: 14px; background: rgba(255,255,255,.96); backdrop-filter: blur(15px); border: 1px solid var(--line); border-radius: 17px; padding: 12px 14px; box-shadow: var(--shadow); }
.cart-summary small { color: var(--muted); display: block; font-size: 9px; }
.cart-summary strong { color: var(--orange); font-size: 23px; }
.address-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 15px; margin-bottom: 10px; }
.address-card h3 { margin: 0 0 7px; font-size: 13px; }
.address-card h3 span { color: var(--muted); font-weight: 500; margin-left: 7px; }
.address-card p { margin: 0; color: #59626b; font-size: 11px; line-height: 1.7; }
.address-card .default-tag { color: var(--orange); background: var(--orange-soft); border-radius: 6px; padding: 3px 6px; font-size: 9px; margin-left: 6px; }
.address-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.logistics-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 12px; }
.tracking-summary { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #edf0ef; }
.tracking-icon { width: 40px; height: 40px; border-radius: 12px; background: #eaf2fd; color: var(--blue); display: grid; place-items: center; font-weight: 800; }
.tracking-summary strong { display: block; font-size: 12px; margin-bottom: 4px; }
.tracking-summary small { color: var(--muted); font-size: 9px; }
.timeline { padding: 17px 0 0 6px; }
.timeline-item { position: relative; padding: 0 0 18px 25px; }
.timeline-item:before { content: ''; position: absolute; left: 4px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #cbd1d5; box-shadow: 0 0 0 4px #f1f3f3; }
.timeline-item:after { content: ''; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: #dfe3e5; }
.timeline-item:last-child:after { display: none; }
.timeline-item:first-child:before { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.timeline-item strong { display: block; font-size: 11px; margin-bottom: 5px; }
.timeline-item p { margin: 0 0 4px; color: #616a73; font-size: 10px; line-height: 1.55; }
.timeline-item time { color: #9ba2a8; font-size: 9px; }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 13px; }
.menu-list a, .menu-list button { width: 100%; border: 0; background: #fff; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; text-align: left; padding: 13px 14px; border-bottom: 1px solid #edf0ef; font-size: 13px; color: var(--ink); }
.menu-list > :last-child { border-bottom: 0; }
.menu-list .menu-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #f3f4f3; color: var(--orange); font-size: 12px; font-weight: 900; }
.menu-list .arrow { color: #aeb4b9; font-size: 18px; }

.toast { position: fixed; z-index: 200; top: 18px; left: 50%; transform: translateX(-50%); width: min(calc(100% - 32px), 420px); display: grid; grid-template-columns: 27px 1fr 22px; gap: 9px; align-items: center; padding: 12px 14px; background: #18212a; color: #fff; border-radius: 13px; box-shadow: 0 18px 55px rgba(0,0,0,.22); font-size: 12px; transition: opacity .25s, transform .25s; }
.toast > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-weight: 800; }
.toast-error > span { background: var(--red); }
.toast button { color: #8e9aa5; border: 0; background: none; font-size: 20px; }
.toast-hide { opacity: 0; transform: translate(-50%, -12px); }

/* Admin */
.admin-page { background: #f2f4f5; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 25px 17px; display: flex; flex-direction: column; }
.admin-brand { display: flex; gap: 12px; align-items: center; padding: 0 9px 25px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.admin-brand strong { display: block; font-size: 15px; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-brand small { display: block; margin-top: 4px; color: #73818e; font-size: 9px; letter-spacing: .08em; }
.admin-sidebar nav { display: grid; gap: 5px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 11px; color: #9ca8b3; padding: 11px 12px; border-radius: 10px; font-size: 13px; }
.admin-sidebar nav a span { width: 22px; text-align: center; color: #71808c; font-weight: 800; }
.admin-sidebar nav a.active { color: #fff; background: var(--orange); box-shadow: 0 9px 22px rgba(240,90,34,.2); }
.admin-sidebar nav a.active span { color: #fff; }
.sidebar-logout { margin-top: auto; }
.sidebar-logout button { width: 100%; border: 1px solid rgba(255,255,255,.1); background: transparent; color: #82909c; border-radius: 10px; padding: 10px; font-size: 11px; }
.admin-main { min-width: 0; }
.admin-topbar { height: 72px; padding: 0 30px; background: rgba(255,255,255,.92); border-bottom: 1px solid #e4e7e8; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); }
.admin-topbar > div { display: flex; align-items: center; gap: 12px; }
.admin-topbar h1 { margin: 0; font-size: 19px; }
.admin-user { color: #626c75; font-size: 12px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #36b873; box-shadow: 0 0 0 4px #e0f5e9; }
.menu-toggle { display: none; border: 0; background: none; font-size: 20px; }
.admin-content { padding: 28px 30px 50px; max-width: 1500px; margin: 0 auto; }
.admin-titlebar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.admin-titlebar h2 { margin: 0 0 5px; font-size: 20px; }
.admin-titlebar p { margin: 0; color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #e3e6e7; border-radius: 16px; padding: 18px; display: grid; grid-template-columns: 1fr 45px; gap: 12px; box-shadow: 0 8px 26px rgba(20,27,34,.035); }
.stat-card small { color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; font-size: 26px; margin-top: 8px; letter-spacing: -.04em; }
.stat-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); font-weight: 900; }
.stat-card:nth-child(2) .stat-icon { background: #eaf2fd; color: var(--blue); }
.stat-card:nth-child(3) .stat-icon { background: #e8f6ee; color: var(--green); }
.stat-card:nth-child(4) .stat-icon { background: #fff3df; color: var(--amber); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 18px; }
.panel { background: #fff; border: 1px solid #e2e5e6; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 26px rgba(20,27,34,.03); }
.panel-header { min-height: 58px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #edf0f0; }
.panel-header h3 { margin: 0; font-size: 14px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.table-wrap { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; min-width: 720px; }
.data-table th { background: #f8f9f8; color: #7a838c; font-size: 10px; text-align: left; padding: 11px 14px; white-space: nowrap; font-weight: 650; border-bottom: 1px solid #e8ebeb; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f0; font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfbfa; }
.cell-main { font-size: 12px; font-weight: 700; }
.cell-sub { color: var(--muted); font-size: 9px; margin-top: 4px; }
.amount-in { color: var(--green); font-weight: 800; }
.amount-out { color: var(--orange); font-weight: 800; }
.table-actions { display: flex; gap: 6px; align-items: center; }
.table-actions form { margin: 0; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-filters .input, .admin-filters .select { width: auto; min-width: 140px; height: 40px; font-size: 11px; background: #fff; }
.admin-filters .input { min-width: 220px; }
.admin-filters .btn { min-height: 40px; }
.pagination { display: flex; justify-content: center; gap: 5px; padding: 16px; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; background: #fff; }
.pagination .active { background: var(--ink); color: #fff; border-color: var(--ink); }
.metric-list { display: grid; gap: 3px; }
.metric-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f0; font-size: 11px; }
.metric-row:last-child { border: 0; }
.metric-row span { color: var(--muted); }
.metric-row strong { font-size: 12px; }
.operation-list { display: grid; gap: 12px; }
.operation-item { display: grid; grid-template-columns: 35px 1fr; gap: 10px; }
.operation-item > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f1f3f3; color: var(--orange); font-size: 11px; font-weight: 900; }
.operation-item strong { display: block; font-size: 11px; margin-bottom: 4px; }
.operation-item p { color: var(--muted); font-size: 9px; margin: 0; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 15px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.product-preview { height: 160px; border-radius: 14px; background: linear-gradient(145deg,#25323e,#111820); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-size: 27px; font-weight: 900; font-style: italic; margin-bottom: 15px; }
.admin-product-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.admin-product-thumb { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 10px; background: var(--ink); background-size: cover; background-position: center; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.admin-product-thumb.large { width: 58px; height: 58px; border-radius: 13px; }
.modal { position: fixed; inset: 0; background: rgba(9,13,17,.62); z-index: 100; display: none; place-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal.open { display: grid; }
.modal-card { width: min(100%, 520px); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-header small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.modal-header button { border: 0; background: none; color: var(--muted); font-size: 24px; }
.modal-body { padding: 18px; }
.shipping-modal { width: min(100%, 600px); }
.shipment-order-card { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; padding: 14px; background: #f7f8f7; border-radius: 14px; }
.shipment-order-card h4 { margin: 0 0 5px; font-size: 13px; }
.shipment-order-card h4 span { color: var(--muted); font-weight: 500; }
.shipment-order-card p { margin: 0; color: var(--orange); font-size: 11px; font-weight: 700; }
.delivery-address { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin: 12px 0 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.delivery-address > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--orange-soft); color: var(--orange); font-weight: 800; }
.delivery-address strong { font-size: 12px; }
.delivery-address p { margin: 5px 0 0; color: #59636c; font-size: 11px; line-height: 1.6; }
.shipment-form { border: 1px solid var(--line); border-radius: 15px; padding: 15px; }
.shipment-form.compact { margin-top: 16px; }
.shipment-secondary { display: grid; gap: 10px; margin-top: 12px; }
.shipment-secondary details { border: 1px solid #f1dede; border-radius: 12px; overflow: hidden; }
.shipment-secondary summary { cursor: pointer; padding: 11px 13px; color: #a64c4c; font-size: 11px; }
.cancel-order-form { display: grid; gap: 10px; padding: 0 12px 12px; }
.tracking-overview { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 14px; border-radius: 14px; background: #f4f8fd; }
.tracking-overview strong { font-size: 12px; }
.tracking-overview p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.admin-timeline { padding: 18px 4px 2px 15px; max-height: 220px; overflow-y: auto; }
.admin-timeline > div { position: relative; padding: 0 0 16px 22px; border-left: 1px solid #dfe4e7; }
.admin-timeline > div:last-child { border-left-color: transparent; }
.admin-timeline i { position: absolute; left: -5px; top: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.admin-timeline strong { display: block; font-size: 11px; }
.admin-timeline p { margin: 4px 0; color: #626d76; font-size: 10px; }
.admin-timeline time { color: #9aa2a9; font-size: 9px; }
.danger-zone { border-color: #f5dcdc; background: #fffafa; }

.admin-login { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .85fr) minmax(520px, 1.15fr); background: #fff; }
.admin-login-art { background: var(--ink); color: #fff; padding: 55px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.admin-login-art:before { content: ''; position: absolute; width: 600px; height: 600px; border: 110px solid rgba(255,255,255,.025); border-radius: 50%; right: -310px; top: -220px; }
.admin-login-art .brand-mark { width: 50px; height: 50px; }
.admin-login-art h1 { font-size: 38px; max-width: 480px; line-height: 1.25; letter-spacing: -.04em; margin: auto 0 18px; }
.admin-login-art p { color: #8e9aa5; font-size: 12px; max-width: 440px; line-height: 1.8; }
.admin-login-art small { color: #53616e; font-size: 9px; letter-spacing: .12em; }
.admin-login-form { display: grid; place-items: center; padding: 50px; }
.admin-login-box { width: min(100%, 390px); }
.admin-login-box .eyebrow { color: var(--orange); }
.admin-login-box h2 { font-size: 28px; margin: 0 0 7px; }
.admin-login-box > p { color: var(--muted); font-size: 11px; margin: 0 0 28px; }

@media (max-width: 980px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-login { grid-template-columns: 1fr; }
    .admin-login-art { display: none; }
}

@media (max-width: 720px) {
    .admin-layout { display: block; }
    .admin-sidebar { position: fixed; z-index: 60; left: -255px; width: 244px; transition: left .2s; box-shadow: 15px 0 45px rgba(0,0,0,.25); }
    .sidebar-open .admin-sidebar { left: 0; }
    .sidebar-open:after { content:''; position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.4); }
    .menu-toggle { display: block; }
    .admin-topbar { padding: 0 16px; }
    .admin-user { display: none; }
    .admin-content { padding: 18px 14px 40px; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 14px; grid-template-columns: 1fr 36px; }
    .stat-card strong { font-size: 21px; }
    .stat-icon { width: 36px; height: 36px; }
    .admin-titlebar { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
}

@media (max-width: 480px) {
    .region-fields { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 390px) {
    .mobile-content { padding-left: 13px; padding-right: 13px; }
    .product-grid { gap: 9px; }
    .product-image { height: 118px; }
    .hero { padding: 21px; }
    .hero-balance strong { font-size: 34px; }
    .inline-fields { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}
