﻿:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --line: #e5e9f2;
    --text: #172033;
    --muted: #667085;
    --brand: #5a55f2;
    --brand-2: #1677ff;
    --side: #101827;
    --side-2: #0a1220;
    --ok: #12b886;
    --danger: #f04438;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
.app { min-height: 100vh; display: flex; }
.sidebar { width: 248px; background: linear-gradient(180deg, var(--side), var(--side-2)); color: #cbd5e1; flex: 0 0 248px; overflow-y: auto; }
.brand { height: 64px; display: flex; align-items: center; padding: 0 24px; color: #fff; font-size: 20px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.06); }
.nav { padding: 12px 0 18px; }
.nav-group { margin: 7px 8px; border-radius: 10px; }
.nav-group[open] { padding-bottom: 6px; background: rgba(255,255,255,.035); }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-section { min-height: 48px; padding: 0 16px; margin: 0; border-radius: 10px; color: #dbe4f0; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; background: rgba(255,255,255,.04); }
.nav-section:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-group > .nav-section::after { content: ">"; font-size: 15px; transition: transform .15s; opacity: .9; }
.nav-group[open] > .nav-section::after { transform: rotate(90deg); }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px; margin: 6px 8px; border-radius: 9px; color: #cbd5e1; font-weight: 650; }
.nav-group .nav-item { min-height: 40px; margin: 5px 0 5px 14px; padding-left: 14px; width: calc(100% - 14px); color: #b9c7da; }
.nav-item:hover, .nav-item.active { background: var(--brand); color: #fff; }
.main { flex: 1; min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-menu-btn, .mobile-nav-backdrop { display: none; }
.crumb { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: #f2f4ff; color: #3538cd; font-weight: 700; }
.top-mini-btn { height: 30px; padding: 0 12px; border-radius: 15px; background: #fff; }
.language-form { margin: 0; }
.lang-select { width: auto; min-width: 116px; height: 34px; padding: 0 10px; border-radius: 17px; font-weight: 700; }
.content { padding: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-pad { padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0; }
.tab { height: 40px; padding: 0 16px; border: 1px solid #d0d5dd; background: #fff; display: inline-flex; align-items: center; cursor: pointer; }
.tab:first-child { border-radius: 6px 0 0 6px; }
.tab:last-child { border-radius: 0 6px 6px 0; }
.tab.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.search { display: flex; height: 40px; }
.search input { width: 260px; border: 1px solid #d0d5dd; border-right: 0; border-radius: 6px 0 0 6px; padding: 0 12px; }
.search button { width: 44px; border: 1px solid #d0d5dd; border-radius: 0 6px 6px 0; background: #fff; cursor: pointer; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.product-card { position: relative; min-height: 156px; padding: 18px; display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: start; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,24,40,.08); }
.discount-badge { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 24px; padding: 0 9px; border-radius: 8px; background: #f43f63; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; box-shadow: 0 8px 18px rgba(244,63,99,.24); z-index: 1; }
.pay-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 72px; }
.pay-summary-label { display: flex; align-items: center; gap: 8px; color: #344054; }
.pay-summary-values { margin-left: auto; display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pay-original { color: #98a2b3; font-weight: 800; text-decoration: line-through; }
.pay-discount-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 6px; background: #fff1f3; color: #f43f63; font-size: 12px; font-weight: 900; }
.pay-total { color: #f04438; font-size: 24px; font-weight: 900; letter-spacing: 0; }
.product-icon { width: 78px; height: 78px; border-radius: 12px; object-fit: cover; background: #f2f4f7; }
.product-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.product-icon span { width: 100%; height: 100%; display: grid; place-items: center; color: var(--brand-2); font-weight: 800; }
.product-main { min-width: 0; }
.product-main h3 { margin: 0 0 8px; font-size: 17px; }
.product-main p { margin: 0 0 8px; color: var(--muted); }
.buy-inline { display: grid; grid-template-columns: minmax(80px, 1fr) auto; gap: 8px; margin-top: 12px; }
.qty-input { min-width: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre-wrap; }
.mall-product-card { cursor: pointer; }
.mall-card-buy { margin-top: 10px; width: 100%; }
.mall-store-page { display: grid; gap: 18px; }
.mall-store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.mall-category-tabs { margin: 0; flex: 1; }
.mall-search-form { margin: 0; display: flex; gap: 8px; align-items: center; }
.mall-product-grid { align-items: stretch; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.mall-product-card { min-height: 176px; padding: 18px; grid-template-columns: 84px minmax(0, 1fr); border: 1px solid #dbe3ef; border-radius: 12px; background: linear-gradient(180deg,#fff,#fbfdff); box-shadow: 0 12px 28px rgba(15,23,42,.06); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.mall-product-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(15,23,42,.1); border-color: #bfcdfd; }
.mall-product-icon { width: 76px; height: 76px; border-radius: 14px; background: #eef2ff; flex: 0 0 auto; }
.mall-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mall-card-top h3 { margin: 0; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; line-height: 1.35; }
.mall-card-top strong { color: var(--brand); white-space: nowrap; }
.mall-card-subtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 38px; overflow: hidden; }
.mall-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); }
.mall-card-meta b { color: #0f172a; }
.mall-buy-modal { max-width: 1120px; }
.mall-buy-grid { align-items: stretch; }
.mall-buy-info, .mall-buy-form { border: 1px solid #dbe3ef; border-radius: 12px; padding: 18px; background: #fff; }
.mall-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf2f7; }
.mall-info-row span { color: var(--muted); }
.mall-info-row strong { color: #0f172a; }
.mall-total-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.mall-total-box span { padding: 14px; border: 1px solid #dbe3ef; border-radius: 10px; background: #f8fafc; }
.mall-total-box strong { display: block; margin-top: 6px; color: var(--brand); font-size: 18px; }
.mall-desc { min-height: 110px; max-height: 280px; overflow-y: auto; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: #344054; white-space: pre-wrap; line-height: 1.7; }
.mall-detail-image { width: 100%; max-height: 320px; object-fit: contain; margin: 12px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.mall-chat-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.mall-chat-messages { position: static; height: 220px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; padding: 12px; overflow-y: auto; }
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.chat-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.chat-list a { display: block; padding: 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.chat-list a.active { background: #eef2ff; color: var(--brand-2); font-weight: 800; }
.chat-list small { display: block; margin-top: 6px; color: var(--muted); font-weight: 500; }
.support-dialog { border: 1px solid #dde6f2; border-radius: 12px; background: #fff; overflow: hidden; }
.support-dialog-head { padding: 14px 16px; border-bottom: 1px solid #edf2f7; background: #f8fafc; display: grid; gap: 4px; }
.support-dialog-body { height: 460px; overflow-y: auto; padding: 16px; background: #f5f7fb; }
.admin-chat-msg { max-width: 70%; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: #fff; line-height: 1.45; word-break: break-word; white-space: pre-wrap; }
.admin-chat-msg.admin { margin-left: auto; background: var(--brand); color: #fff; }
.admin-chat-time { display: block; margin-top: 6px; font-size: 12px; opacity: .72; }
.support-reply { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid #edf2f7; }
.support-page-dialog { max-width: 980px; margin: 0 auto; }
.support-admin-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.support-session-list { border: 1px solid #dde6f2; border-radius: 12px; overflow: hidden; background: #fff; }
.support-session { display: block; padding: 13px 14px; border-bottom: 1px solid #edf2f7; color: #172033; text-decoration: none; }
.support-session.active { background: #eef2ff; }
.support-session strong { display: flex; justify-content: space-between; gap: 8px; }
.support-session small { display: block; color: #64748b; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; }
.unified-chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.unified-chat-list { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.unified-chat-item { display: block; padding: 13px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.unified-chat-item.active { background: #eef2ff; color: var(--brand-2); font-weight: 800; }
.unified-chat-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unified-chat-item small { display: block; margin-top: 5px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unified-chat-title { padding: 10px 14px; color: var(--muted); font-size: 12px; font-weight: 800; background: #f8fafc; border-bottom: 1px solid var(--line); }
.unified-chat-empty { padding: 14px; color: var(--muted); }
.compact-chat .support-dialog-body { height: 430px; }
.compact-admin-chat .support-dialog-body { height: 470px; }
.unified-chat-layout .support-page-dialog {
    width: 100%;
    max-width: none;
    margin: 0;
}
.unified-chat-layout .admin-chat-msg {
    max-width: 78%;
}
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notify-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notify-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 16px; background: #f3f6fb; border-radius: 8px; }
.notify-toggle input { width: 18px; height: 18px; }
.input-suffix { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: #f8fafc; color: var(--muted); }
.input + .input-suffix { margin-left: -1px; }
.inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.supplier-upload-row { align-items: center; }
.supplier-upload-row input[type="file"] { padding: 8px; }
.product-title { font-size: 16px; font-weight: 800; margin: 4px 0 10px; color: #020617; }
.meta-row { display: flex; justify-content: space-between; margin-top: 8px; color: #344054; }
.price { color: #4f46e5; font-weight: 800; }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 4px; background: #eef4ff; color: #1677ff; font-weight: 600; font-size: 12px; }
.notice { background: #eef4ff; border: 1px solid #a7c7ff; color: #175cd3; padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; }
.api-doc-page { display: grid; gap: 16px; }
.api-doc-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 28px; background: linear-gradient(135deg, #111827 0%, #242161 56%, #5a55f2 100%); color: #fff; overflow: hidden; position: relative; }
.api-doc-hero::after { content: ""; position: absolute; right: -88px; bottom: -100px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(255,255,255,.08); }
.api-doc-hero > * { position: relative; z-index: 1; }
.api-doc-kicker { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.13); color: #dbeafe; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.api-doc-hero h2 { margin: 14px 0 8px; font-size: 30px; letter-spacing: 0; }
.api-doc-hero p { margin: 0; max-width: 720px; color: #dbeafe; line-height: 1.8; }
.api-doc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.api-doc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.api-doc-summary-card { padding: 16px; display: grid; gap: 8px; min-width: 0; }
.api-doc-summary-card span { color: var(--muted); font-weight: 700; }
.api-doc-summary-card strong { color: #0f172a; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.api-doc-nav { position: sticky; top: 82px; padding: 10px; display: grid; gap: 4px; }
.api-doc-nav a { min-height: 36px; display: flex; align-items: center; padding: 0 12px; border-radius: 6px; color: #475467; font-weight: 750; }
.api-doc-nav a:hover { background: #eef2ff; color: var(--brand); }
.api-doc-content { display: grid; gap: 16px; min-width: 0; }
.api-doc-section, .api-doc-endpoint { padding: 22px; scroll-margin-top: 90px; }
.api-doc-section h3, .api-doc-endpoint h3 { margin: 0 0 12px; font-size: 20px; }
.api-doc-section p, .api-doc-endpoint p { line-height: 1.8; }
.api-endpoint-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.api-endpoint-head h3 { margin: 0; }
.api-method { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 26px; border-radius: 5px; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.api-method.get { background: #1677ff; }
.api-method.post { background: #12b886; }
.api-path { display: block; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; padding: 8px 10px; border-radius: 6px; background: #f8fafc; color: #334155; border: 1px solid var(--line); }
.api-code-block { position: relative; margin: 12px 0; border-radius: 8px; overflow: hidden; border: 1px solid #1e293b; background: #0f172a; }
.api-code-block button { position: absolute; right: 10px; top: 10px; z-index: 1; height: 28px; padding: 0 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; background: rgba(255,255,255,.10); color: #fff; cursor: pointer; font-weight: 700; }
.api-code-block pre { margin: 0; padding: 42px 16px 16px; overflow-x: auto; color: #dbeafe; line-height: 1.7; font-size: 13px; }
.api-code-block code { color: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre; }
.api-param-table { width: 100%; border-collapse: collapse; margin: 12px 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.api-param-table th, .api-param-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.api-param-table th { background: #f8fafc; color: #475467; font-weight: 800; }
.api-param-table tr:last-child td { border-bottom: 0; }
.api-param-table code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 2px 5px; border-radius: 4px; background: #eef2ff; color: #3730a3; }
.api-reserved-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.api-reserved-grid span { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.api-reserved-grid small { color: var(--muted); font-weight: 700; }
.hero-dashboard { margin-bottom: 22px; }
.hero-dashboard h1 { margin: 0 0 6px; font-size: 28px; }
.stat-card h2 { margin: 10px 0 6px; font-size: 26px; }
.stat-card p { margin: 0; color: var(--muted); }
.quick-card { margin-top: 18px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.quick-grid a { height: 84px; border-radius: 8px; background: #eef7ff; color: #0066b3; display: grid; place-items: center; font-weight: 700; }
.quick-grid a:nth-child(2) { background: #eefaf3; color: #008a45; }
.quick-grid a:nth-child(3) { background: #fff4e6; color: #c2410c; }
.quick-grid a:nth-child(4) { background: #f8efff; color: #7e22ce; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border-radius: 8px; background: #f8fafc; margin-bottom: 10px; }
.list-row p { margin: 5px 0 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border: 1px solid #d0d5dd; background: #fff; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.form-row { margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; color: #344054; font-weight: 600; }
.input, .select { width: 100%; height: 40px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 12px; background: #fff; }
.section-title { margin: 24px 0 12px; font-size: 16px; color: #101828; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check-grid label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #d8e0ee; border-radius: 8px; background: #f8fafc; }
.textarea { width: 100%; min-height: 220px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 12px; background: #fff; resize: vertical; font-family: inherit; }
.textarea-sm { min-height: 110px; }
.textarea-xs { min-height: 46px; height: 46px; padding: 8px 12px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filter-bar .input, .filter-bar .select { max-width: 260px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; margin-bottom: 16px; }
.filter-grid label { font-weight: 600; color: #344054; }
.filter-actions { display: flex; align-items: end; gap: 12px; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.inline-fields { display: grid; grid-template-columns: 1fr 220px; gap: 10px; }
.carrier-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; background: #f8fafc; }
.page-title { text-align: center; font-weight: 700; margin: 10px 0 20px; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; white-space: nowrap; }
.table th { color: #475467; font-weight: 700; background: #f8fafc; }
.admin-sms-log-table { table-layout: fixed; min-width: 1280px; }
.admin-sms-log-table th,
.admin-sms-log-table td { overflow: hidden; text-overflow: ellipsis; }
.sms-content-cell { width: 46%; min-width: 360px; max-width: 760px; white-space: normal !important; }
.admin-sms-log-table .sms-content-cell { position: relative; width: 520px; min-width: 0; max-width: 520px; padding-right: 58px; }
.sms-content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.sms-content-text { display: block; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1f2937; }
.sms-view-btn { color: var(--brand-2); font-weight: 800; white-space: nowrap; }
.admin-sms-log-table .sms-content-wrap { display: block; width: 100%; min-width: 0; }
.admin-sms-log-table .sms-content-text { display: block; width: 100%; max-width: 100%; }
.admin-sms-log-table .sms-view-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 38px; text-align: right; }
.sms-content-modal-body { min-height: 160px; max-height: 56vh; overflow: auto; margin: 0 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; color: #172033; font-family: inherit; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pagination .btn { min-width: 38px; padding: 0 12px; }
.page-total { margin-right: auto; color: var(--muted); font-weight: 700; }
.raw-log summary { color: var(--brand-2); cursor: pointer; font-weight: 700; }
.raw-log pre { max-width: 560px; max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; background: #0f172a; color: #e2e8f0; border-radius: 6px; white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 48%, #f3f7ff 100%); }
.auth-card { width: min(430px, 100%); padding: 30px; border-radius: 14px; border-color: #dce5f3; box-shadow: 0 24px 60px rgba(15,23,42,.10); }
.auth-lang { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.auth-lang .select { height: 40px; border-radius: 10px; background: #f8fafc; }
.auth-brand-block { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #5a55f2, #1677ff); color: #fff; font-size: 22px; font-weight: 900; box-shadow: 0 12px 26px rgba(90,85,242,.24); }
.auth-brand-name { font-size: 19px; font-weight: 900; color: #0f172a; }
.auth-brand-subtitle { margin-top: 3px; color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.auth-title { font-size: 26px; font-weight: 900; margin: 0 0 22px; color: #0f172a; }
.auth-card .input { height: 44px; border-radius: 10px; background: #fbfdff; }
.auth-card .input:focus, .auth-lang .select:focus { outline: 0; border-color: #5a55f2; box-shadow: 0 0 0 3px rgba(90,85,242,.12); }
.auth-submit { width: 100%; height: 44px; border-radius: 10px; margin-top: 4px; box-shadow: 0 12px 24px rgba(90,85,242,.22); }
.captcha-row { display: grid; grid-template-columns: 1fr 128px; gap: 10px; align-items: center; }
.captcha-img { width: 128px; height: 44px; border: 1px solid #cbd5e1; border-radius: 10px; cursor: pointer; background: #eef4ff; }
.auth-foot { margin: 16px 0 0; text-align: center; }
.auth-foot a { color: #4f46e5; font-weight: 800; }
.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; }
.alert-error { background: #fff1f0; color: #b42318; border: 1px solid #fecdca; }
.alert-ok { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.58); z-index: 30; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; }
.modal { width: min(980px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 8px; padding: 24px; }
.modal-sm { width: min(780px, 100%); }
.modal-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; }
.announcement-body { min-height: 120px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; line-height: 1.8; white-space: normal; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; transition: border-color .15s, transform .15s; }
.contact-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.contact-card span { color: var(--muted); font-weight: 700; }
.contact-card strong { color: #101828; font-size: 16px; }
.recharge-shell { display: grid; gap: 22px; }
.recharge-tabs { min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.recharge-tab { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 8px; color: #475467; font-weight: 800; }
.recharge-tab.active { color: #0f172a; background: #f8fafc; }
.recharge-tab-icon { color: var(--brand); font-size: 17px; }
.recharge-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.recharge-panel { padding: 26px; }
.recharge-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.recharge-kicker { margin: 0 0 8px; color: #10b981; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.recharge-panel-head h2 { margin: 0 0 8px; font-size: 30px; color: #0f172a; }
.recharge-panel-head span { color: #667085; line-height: 1.7; }
.recharge-balance { min-width: 168px; padding: 16px; border: 1px solid #dbe3ef; border-radius: 12px; background: #f8fafc; text-align: right; }
.recharge-balance small { display: block; color: #667085; font-weight: 700; margin-bottom: 6px; }
.recharge-balance strong { color: var(--brand); font-size: 24px; font-weight: 900; }
.recharge-balance em { color: #475467; font-style: normal; font-weight: 800; margin-left: 3px; }
.recharge-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.recharge-method { min-height: 86px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 14px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.recharge-method:hover { transform: translateY(-1px); border-color: #bfcdfd; box-shadow: 0 10px 22px rgba(15,23,42,.06); }
.recharge-method.active { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.10); }
.recharge-method-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #ecfdf3; color: #0f9f76; font-size: 20px; font-weight: 900; }
.recharge-method strong { display: block; color: #0f172a; font-size: 16px; }
.recharge-method small { display: block; color: #667085; margin-top: 4px; font-weight: 650; }
.recharge-method em { min-height: 24px; padding: 0 8px; border-radius: 999px; background: #10b981; color: #fff; font-style: normal; display: inline-flex; align-items: center; font-size: 12px; font-weight: 900; }
.money-input { position: relative; }
.money-input span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #475467; font-size: 20px; font-weight: 900; }
.money-input .input { height: 52px; padding-left: 42px; border-radius: 12px; font-size: 20px; font-weight: 900; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.quick-amount { height: 44px; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; color: #334155; cursor: pointer; font-weight: 900; }
.quick-amount:hover { border-color: var(--brand); color: var(--brand); background: #f5f3ff; }
.network-notice { margin: 18px 0; padding: 16px 18px; border: 1px solid #fed7aa; border-radius: 12px; background: #fffbeb; color: #92400e; line-height: 1.7; }
.network-notice strong { color: #ea580c; font-size: 15px; }
.network-notice p { margin: 6px 0 0; }
.recharge-submit { width: 100%; height: 48px; border-radius: 12px; font-size: 16px; box-shadow: 0 12px 24px rgba(90,85,242,.22); }
.card-redeem-box { margin-top: 6px; }
.recharge-side { display: grid; gap: 16px; }
.gift-card { min-height: 132px; padding: 20px; color: #fff; border: 0; background: linear-gradient(135deg, #ff7a1a, #f97316); display: flex; align-items: center; justify-content: space-between; gap: 16px; overflow: hidden; position: relative; }
.gift-card::after { content: "◎"; position: absolute; right: -12px; bottom: -22px; font-size: 110px; color: rgba(255,255,255,.16); font-weight: 900; }
.gift-card > * { position: relative; z-index: 1; }
.gift-card strong { display: block; font-size: 22px; margin-bottom: 8px; }
.gift-card span { color: rgba(255,255,255,.86); line-height: 1.6; }
.gift-card .btn { color: #f97316; border-color: #fff; font-weight: 900; }
.recharge-safe-card { padding: 20px; }
.recharge-safe-card h3 { margin: 0 0 12px; }
.recharge-safe-card ul { margin: 0; padding-left: 18px; color: #475467; line-height: 1.9; }
.recharge-modal { width: min(820px, 100%); border-radius: 18px; padding: 28px 36px; box-shadow: 0 24px 60px rgba(15,23,42,.22); }
.recharge-pay-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.link-btn { border: 0; background: transparent; color: #475467; font-weight: 700; cursor: pointer; padding: 0; }
.pay-brand { display: grid; place-items: center; gap: 6px; margin-top: 6px; }
.pay-brand h2 { margin: 0; font-size: 18px; }
.pay-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #35d399, #0f9f76); display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 900; }
.recharge-pay-grid { display: grid; grid-template-columns: 1fr 296px; gap: 20px; align-items: start; }
.pay-notice { min-height: 62px; border: 1px solid #fecaca; background: #fff1f2; color: #ef4444; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.pay-notice p { margin: 6px 0 0; color: #7f1d1d; }
.pay-amount-box { min-height: 106px; border-radius: 14px; background: linear-gradient(135deg, #16c784, #0b9d73); color: #fff; display: grid; place-items: center; text-align: center; margin-bottom: 12px; box-shadow: 0 14px 28px rgba(16,185,129,.2); }
.pay-amount-box strong { display: block; font-size: 34px; line-height: 1; }
.pay-amount-box small { font-size: 16px; }
.mini-copy { border: 0; background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-weight: 700; }
.address-box { height: 42px; border: 1px solid #d0d5dd; background: #f8fafc; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; }
.address-box strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-icon { border: 0; background: transparent; color: #64748b; cursor: pointer; font-weight: 800; }
.pay-network { margin-top: 8px; color: #12b886; font-weight: 700; font-size: 12px; }
.qr-card { border: 1px solid #dbe3ef; border-radius: 14px; min-height: 192px; display: grid; place-items: center; padding: 16px; text-align: center; }
.qr-card img { width: 132px; height: 132px; object-fit: contain; }
.qr-card p { margin: 8px 0 0; color: #475467; }
.pay-countdown { margin-top: 14px; border: 1px solid #facc15; background: #fffbeb; color: #b45309; border-radius: 14px; min-height: 74px; display: grid; place-items: center; text-align: center; }
.pay-countdown span { font-weight: 700; }
.pay-countdown strong { font-size: 28px; line-height: 1; }
.pay-order-info { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: grid; gap: 10px; }
.pay-order-info div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pay-order-info span { color: #667085; }
.pay-order-info strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.landing-page { min-height: 100vh; background: #f5f7fb; color: #0f172a; }
.landing-nav { width: min(1180px, calc(100% - 32px)); height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; }
.landing-brand img { height: 34px; width: auto; }
.landing-nav nav { display: flex; align-items: center; gap: 10px; font-weight: 750; color: #475467; }
.landing-nav nav a { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; }
.landing-nav nav a:hover { background: #eef2ff; color: var(--brand); }
.landing-nav-cta { background: var(--brand); color: #fff !important; }
.landing-hero { width: min(1180px, calc(100% - 32px)); margin: 0 auto; min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.15fr) 420px; gap: 36px; align-items: center; }
.landing-hero-copy { min-height: 520px; border-radius: 28px; padding: 58px; color: #fff; background: radial-gradient(circle at 20% 10%, rgba(99,102,241,.85), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1e1b4b 58%, #312e81 100%); box-shadow: 0 28px 70px rgba(15,23,42,.24); position: relative; overflow: hidden; }
.landing-hero-copy::after { content: ""; position: absolute; right: -90px; bottom: -110px; width: 320px; height: 320px; border-radius: 50%; border: 54px solid rgba(255,255,255,.08); }
.landing-eyebrow { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: #c7d2fe; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.landing-hero h1 { position: relative; z-index: 1; margin: 26px 0 18px; font-size: 58px; line-height: 1.04; letter-spacing: 0; }
.landing-hero p { position: relative; z-index: 1; width: min(560px, 100%); margin: 0; color: #dbeafe; font-size: 18px; line-height: 1.8; }
.landing-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.landing-actions .btn { min-width: 132px; height: 46px; border-radius: 12px; }
.landing-ghost-btn { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.landing-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 46px; max-width: 560px; }
.landing-stats div { border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 16px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.landing-stats strong { display: block; font-size: 24px; }
.landing-stats span { color: #bfdbfe; font-weight: 700; }
.landing-login { padding: 28px; border-radius: 20px; box-shadow: 0 24px 60px rgba(15,23,42,.12); }
.landing-login h2 { margin: 0 0 8px; font-size: 26px; }
.landing-login p { margin: 0 0 22px; color: var(--muted); }
.landing-login-submit { width: 100%; height: 44px; border-radius: 10px; }
.landing-login-foot { margin: 16px 0 0 !important; text-align: center; }
.landing-login-foot a { color: var(--brand); font-weight: 900; }
.landing-section { width: min(1180px, calc(100% - 32px)); margin: 26px auto 0; padding: 42px 0; }
.landing-section-head { text-align: center; margin-bottom: 24px; }
.landing-section-head span { color: var(--brand); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.landing-section-head h2 { margin: 8px 0 0; font-size: 34px; }
.landing-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.landing-feature { padding: 24px; border-radius: 18px; min-height: 220px; transition: transform .15s, box-shadow .15s; }
.landing-feature:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(15,23,42,.10); }
.landing-feature b { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #eef2ff; color: var(--brand); }
.landing-feature h3 { margin: 22px 0 10px; font-size: 20px; }
.landing-feature p { margin: 0; color: var(--muted); line-height: 1.7; }
.landing-band { width: 100%; max-width: none; padding: 58px max(16px, calc((100% - 1180px) / 2)); background: #111827; color: #fff; }
.landing-band .landing-section-head h2 { color: #fff; }
.landing-benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.landing-benefits div { min-height: 150px; border-radius: 18px; padding: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); }
.landing-benefits strong { display: block; margin-bottom: 10px; font-size: 20px; }
.landing-benefits span { color: #cbd5e1; line-height: 1.7; }
.landing-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.landing-flow div { min-height: 160px; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.landing-flow em { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-style: normal; font-weight: 900; }
.landing-flow strong { display: block; margin: 18px 0 8px; font-size: 18px; }
.landing-flow span { color: var(--muted); line-height: 1.7; }
.landing-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; display: flex; justify-content: space-between; gap: 16px; color: #667085; border-top: 1px solid var(--line); }
.landing-footer span:first-child { color: #0f172a; font-weight: 900; }

@media (max-width: 900px) {
    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        right: auto;
        bottom: 0;
        left: -320px;
        width: min(82vw, 300px);
        max-width: 300px;
        transform: translateX(0);
        transition: left .2s ease, transform .2s ease;
        z-index: 45;
        box-shadow: 18px 0 45px rgba(15,23,42,.28);
    }
    .mobile-nav-open .sidebar,
    body.mobile-nav-open .sidebar { left: 0; transform: translateX(0); }
    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        padding: 0;
        background: rgba(15,23,42,.46);
        z-index: 40;
    }
    .mobile-nav-open .mobile-nav-backdrop,
    body.mobile-nav-open .mobile-nav-backdrop { display: block; }
    .mobile-menu-btn {
        display: inline-flex;
        flex: 0 0 auto;
        height: 38px;
        padding: 0 12px;
        border-radius: 10px;
        background: var(--brand);
        border-color: var(--brand);
        color: #fff;
    }
    .mobile-nav-open { overflow: hidden; }
    body { overflow-x: hidden; }
    .app { display: block; min-width: 0; }
    .main { width: 100%; min-width: 0; }
    .topbar {
        height: auto;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 8px;
        padding: 10px 12px;
    }
    .crumb {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.35;
        word-break: break-word;
    }
    .topbar-left { width: 100%; }
    .top-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .top-actions > span:not(.pill) { display: none; }
    .top-actions .btn,
    .top-actions .pill,
    .top-actions .lang-select {
        width: 100%;
        min-width: 0;
        height: 38px;
        padding: 0 8px;
        border-radius: 10px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .language-form { min-width: 0; }
    .content { padding: 12px; }
    .card-pad { padding: 16px; }
    .recharge-layout { grid-template-columns: 1fr; }
    .recharge-panel { padding: 18px; }
    .recharge-panel-head { flex-direction: column; }
    .recharge-balance { width: 100%; text-align: left; }
    .recharge-method-grid { grid-template-columns: 1fr; }
    .quick-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gift-card { min-height: 118px; }
    .grid-2 { grid-template-columns: 1fr; }
    .check-grid, .check-grid-4 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-grid { grid-template-columns: 1fr; gap: 12px; }
    .product-card { min-height: 132px; padding: 14px; grid-template-columns: 64px 1fr; gap: 12px; }
    .product-icon { width: 64px; height: 64px; }
    .quick-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .api-doc-hero { align-items: stretch; flex-direction: column; padding: 22px; }
    .api-doc-hero h2 { font-size: 24px; }
    .api-doc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .api-doc-layout { grid-template-columns: 1fr; }
    .api-doc-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .api-doc-section, .api-doc-endpoint { padding: 16px; }
    .api-reserved-grid { grid-template-columns: 1fr; }
    .api-param-table { display: block; overflow-x: auto; }
    .api-code-block pre { font-size: 12px; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .tab { flex: 0 0 auto; }
    .search { width: 100%; }
    .search input { width: 100%; min-width: 0; }
    .filter-bar { align-items: stretch; }
    .filter-bar .input,
    .filter-bar .select,
    .filter-bar .btn { max-width: none; width: 100%; }
    .filter-grid { grid-template-columns: 1fr; }
    .inline-fields { grid-template-columns: 1fr; }
    .table-scroll { width: 100%; overflow-x: auto; }
    .table th, .table td { padding: 10px; }
    .pagination { justify-content: flex-start; }
    .page-total { width: 100%; margin-right: 0; }
    .modal-mask { align-items: flex-start; padding: 12px; overflow-y: auto; }
    .modal { width: 100%; padding: 16px; margin: 10px 0; }
    .modal-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 1fr; }
    .notify-grid { grid-template-columns: 1fr; }
    .mall-chat-messages { height: 260px; }
    .mall-store-head { flex-direction: column; align-items: stretch; }
    .mall-search-form { width: 100%; flex-wrap: wrap; }
    .mall-search-form .input { flex: 1 1 220px; }
    .support-dialog-body { height: 420px; }
    .admin-chat-msg { max-width: 90%; }
    .support-reply { grid-template-columns: 1fr; }
    .support-admin-grid { grid-template-columns: 1fr; }
    .unified-chat-layout { grid-template-columns: 1fr; }
    .compact-chat .support-dialog-body { height: 360px; }
    .contact-grid { grid-template-columns: 1fr; }
    .recharge-pay-grid { grid-template-columns: 1fr; }
    .recharge-modal { padding: 18px; border-radius: 14px; }
    .pay-amount-box strong { font-size: 28px; }
    .pay-order-info div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .landing-nav { height: auto; padding: 14px 0; align-items: flex-start; flex-direction: column; }
    .landing-nav nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .landing-nav nav a { flex: 0 0 auto; }
    .landing-hero { min-height: 0; grid-template-columns: 1fr; gap: 14px; }
    .landing-hero-copy { min-height: 0; padding: 30px 22px; border-radius: 20px; }
    .landing-hero h1 { font-size: 38px; }
    .landing-hero p { font-size: 15px; }
    .landing-stats { grid-template-columns: 1fr; margin-top: 28px; }
    .landing-login { padding: 22px; border-radius: 16px; }
    .landing-section { padding: 30px 0; }
    .landing-section-head h2 { font-size: 26px; }
    .landing-card-grid,
    .landing-benefits,
    .landing-flow { grid-template-columns: 1fr; }
    .landing-feature { min-height: 0; }
    .landing-band { padding-top: 38px; padding-bottom: 38px; }
    .landing-footer { flex-direction: column; padding-bottom: 28px; }
}

@media (max-width: 420px) {
    .top-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .top-actions .btn,
    .top-actions .pill,
    .top-actions .lang-select { height: 40px; }
    .content { padding: 10px; }
    .card-pad { padding: 14px; }
    .grid-4 { grid-template-columns: 1fr; }
    .landing-hero h1 { font-size: 32px; }
    .landing-actions .btn { width: 100%; }
}

[dir="rtl"] .sidebar { direction: rtl; }
[dir="rtl"] .top-actions { flex-direction: row-reverse; }
[dir="rtl"] .nav-group .nav-item { margin-left: 0; margin-right: 14px; padding-left: 16px; padding-right: 14px; }

.support-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    font-size: 14px;
}
.support-toggle {
    border: 0;
    border-radius: 999px;
    background: #5a55f2;
    color: #fff;
    box-shadow: 0 12px 30px rgba(90,85,242,.28);
    cursor: pointer;
    font-weight: 800;
    padding: 13px 18px;
}
.support-panel {
    display: none;
    width: 340px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
.support-widget.open .support-panel { display: block; }
.support-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #111827;
    color: #fff;
}
.support-head button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}
.support-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 300px;
    overflow-y: auto;
    padding: 14px;
    background: #f6f8fc;
}
.support-empty {
    color: #64748b;
    font-size: 13px;
    text-align: center;
    padding: 40px 10px;
}
.support-msg {
    max-width: 84%;
    padding: 9px 11px;
    border-radius: 12px;
    background: #fff;
    color: #102033;
    line-height: 1.45;
    word-break: break-word;
}
.support-msg.user {
    align-self: flex-end;
    background: #5a55f2;
    color: #fff;
}
.support-msg.admin {
    align-self: flex-start;
}
.support-msg-time {
    display: block;
    margin-top: 5px;
    opacity: .7;
    font-size: 11px;
}
.support-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5ebf3;
}
.chat-compose-form {
    position: relative;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
}
.support-reply.chat-compose-form,
.support-form.chat-compose-form {
    grid-template-columns: 1fr auto auto auto;
}
.chat-file-input {
    display: none;
}
.chat-tool-btn {
    min-width: 54px;
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
}
.emoji-panel {
    display: none;
    position: absolute;
    right: 76px;
    bottom: calc(100% + 8px);
    z-index: 20;
    grid-template-columns: repeat(6, 32px);
    gap: 6px;
    padding: 10px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15,23,42,.15);
}
.emoji-panel.open {
    display: grid;
}
.emoji-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f2f5fb;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.emoji-btn:hover {
    background: #e6ebff;
}
.chat-image-link {
    display: block;
    margin-top: 8px;
}
.chat-image {
    display: block;
    max-width: min(260px, 100%);
    max-height: 220px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,.6);
    border: 1px solid rgba(148,163,184,.35);
}
.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    color: #172033;
    font-weight: 700;
}

@media (max-width: 520px) {
    .support-widget { right: 12px; bottom: 12px; left: 12px; }
    .support-toggle { width: 100%; }
    .support-panel { width: 100%; }
    .support-messages { height: 260px; }
    .chat-compose-form,
    .support-reply.chat-compose-form,
    .support-form.chat-compose-form { grid-template-columns: 1fr auto auto; }
    .chat-compose-form .btn-primary { grid-column: 1 / -1; }
    .emoji-panel { right: 8px; grid-template-columns: repeat(4, 32px); }
}
