.agent-page { font-size: 14px; }
.agent-upgrade-action { white-space:nowrap; padding:7px 13px; }
.agent-upgrade-dialog { max-height:calc(100vh - 32px); overflow-y:auto; }
.agent-upgrade-summary { background:#f7f9fc; padding:14px 18px; border:1px solid #e5eaf2; border-radius:10px; line-height:1.9; }
.agent-upgrade-summary p { margin:4px 0; }
.agent-upgrade-summary strong { color:#172437; }
.agent-upgrade-detail { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.agent-upgrade-rule { font-size:13px !important; color:#657187; margin-top:10px; }
@media(max-width:640px) { .agent-upgrade-dialog { padding:20px; }.agent-upgrade-dialog .agent-dialog-actions { flex-wrap:wrap; }.agent-upgrade-dialog .primary-button { width:100%; } }
.agent-buy-hint { min-height:25px; margin:10px 0 0; }
.agent-delegation-note { padding:12px 16px; background:#fff3e9; border:1px solid #f0ddcf; border-radius:10px; margin-bottom:22px; }
.agent-shop-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:30px 0 24px; }
.agent-shop-heading p { color:#657187; margin:10px 0 0; }
.agent-shop-badge { color:#8a471e; background:#fff0e5; padding:9px 14px; border-radius:20px; }
.agent-products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.agent-product { background:#fff; border:1px solid #e1e6ed; border-radius:16px; padding:28px; }
.agent-product[data-tier="PRO"] { border:2px solid #ee7a48; padding:27px; background:linear-gradient(150deg,#fff8f2,#fff 65%); }
.agent-product[data-tier="FLAGSHIP"] { border-top:4px solid #263b63; padding-top:25px; }
.agent-product-top { display:flex; justify-content:space-between; gap:10px; color:#8793a5; }
.agent-product-top span:first-child { letter-spacing:1px; font-weight:700 !important; }
.agent-page .agent-product h2 { font-size:26px !important; margin:24px 0 10px; }
.agent-product > p { color:#657187; }
.agent-product-price { display:flex; align-items:baseline; gap:10px; margin:26px 0; }
.agent-page .agent-product-price strong { font-size:46px !important; font-weight:750 !important; color:#172437; }
.agent-product-price span { color:#657187; }
.agent-product ul { list-style:none; padding:20px 0; margin:0 0 16px; border-top:1px solid #edf0f5; color:#536075; line-height:2.2; }
.agent-product li:before { content:"✓"; color:#249a72; margin-right:10px; }
.agent-card-quantity { display:flex; align-items:center; gap:12px; }
.agent-card-quantity input { width:82px; border:1px solid #d8dee8; border-radius:8px; padding:9px 10px; margin-left:auto; }
.agent-product > button { width:100%; padding:13px 8px; margin-top:4px; }
.agent-product .agent-card-total { text-align:right; color:#b94c23; margin:12px 0; }
.agent-license-history { margin-top:38px !important; }
.agent-license-history select { border:1px solid #d8dee8; background:#fff; padding:10px; border-radius:8px; margin-left:10px; }
.agent-code-cell { display:flex; align-items:center; gap:12px; }
.agent-code-cell code { font:12px ui-monospace,Consolas,monospace; white-space:nowrap; }
.agent-code-cell button { padding:5px 9px; }
.agent-code-status { border-radius:12px; background:#edf0f5; color:#536075; padding:4px 10px; white-space:nowrap; }
.agent-code-status.available { background:#e8f7ee; color:#178457; }
.agent-pending-banner { background:#fff5db; border:1px solid #efcd7e; padding:16px 20px; border-radius:12px; margin-bottom:22px; display:flex; justify-content:space-between; gap:16px; align-items:center; }
.agent-card-result { max-width:690px; }
.agent-card-result textarea { width:100%; margin-top:12px; padding:16px; resize:vertical; font:13px/1.8 ui-monospace,Consolas,monospace; border:1px solid #d8dee8; border-radius:9px; }
#agent-login-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.agent-page .primary-button { background: #e75c2c; border-color: #e75c2c; box-shadow: none; }
.agent-page .primary-button:hover { background: #ca461a; border-color: #ca461a; }
.agent-login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.agent-login-intro { background: #111827; color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 80px; }
.agent-login-intro .agent-brand { padding: 0; }
.agent-page .agent-login-intro h1 { font-size: clamp(34px,3.5vw,56px) !important; line-height: 1.35; letter-spacing: 1px; margin: 20px 0; }
.agent-login-intro p { color: #bcc6d7; line-height: 2; }
.agent-page .agent-eyebrow { letter-spacing: 2px; color: #e9764e; font-weight: 600 !important; }
.agent-login-footnote { color: #93a2b8; }
.agent-login-panel { display: grid; place-items: center; padding: 40px; background: #fafbfc; }
.agent-login-panel form { max-width: 390px; width: 100%; }
.agent-page .agent-login-panel h2 { font-size: 29px !important; margin: 12px 0; }
.agent-login-panel label { display: grid; gap: 10px; margin: 24px 0; }
.agent-login-panel input { width: 100%; padding: 14px 16px; border: 1px solid #d8dee8; border-radius: 9px; background: #fff; }
.agent-login-panel button { width: 100%; padding: 14px; }
.agent-login-hint { text-align: center; margin-top: 22px; }
.agent-owner-preview { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid #e3e7ed; border-radius: 12px; padding: 18px 22px; margin-bottom: 20px; }
.agent-owner-preview p { color: #657187; margin: 7px 0 0; line-height: 1.6; }
.agent-owner-preview form { display: flex; gap: 8px; margin-left: auto; }
.agent-owner-preview input, .agent-owner-preview select { min-width: 150px; max-width: 100%; padding: 10px; border: 1px solid #d8dee8; border-radius: 8px; }
.agent-empty-state { margin-top: 24px; padding: 48px 28px; background: #fff; border: 1px solid #e3e7ed; border-radius: 12px; text-align: center; line-height: 1.9; color: #657187; }
.agent-empty-state strong { color: #172437; font-size: 20px !important; }
.agent-page :where(h1,h2,h3,p,a,button,label,input,select,table,th,td,span,small,strong,b),
.agents-panel :where(h1,h2,h3,p,a,button,label,input,select,table,th,td,span,small,strong,b),
.agent-dialog :where(h1,h2,h3,p,a,button,label,input,select,table,th,td,span,small,strong,b) { font-size: 14px !important; }
.agent-shell { display: grid; grid-template-columns: 216px minmax(0,1fr); min-height: 100vh; }
.agent-sidebar { background: #111827; color: #fff; padding: 30px 18px; display: flex; flex-direction: column; gap: 36px; }
.agent-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 10px; }
.agent-brand img { width: 40px; height: 40px; object-fit: contain; }
.agent-brand span { font-size: 23px !important; font-weight: 700 !important; }
.agent-brand small { display: block; color: #c6cfdf; margin-top: 5px; }
.agent-sidebar nav { display: grid; gap: 8px; }
.agent-sidebar nav button { background: transparent; color: #c6cfdf; border: 0; padding: 14px 18px; text-align: left; border-radius: 10px; }
.agent-sidebar nav button.active { background: #ff6b35; color: #fff; font-weight: 700 !important; }
.agent-contact { color: #c6cfdf; line-height: 1.8; margin-top: auto; padding: 0 10px; }
.agent-main { min-width: 0; padding: 0 36px 40px; }
.agent-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 18px; min-height: 84px; }
.agent-balance-card { padding: 28px 32px; border: 1px solid #eadfd8; border-radius: 16px; background: linear-gradient(105deg,#fff3ea,#fff 75%); display: flex; align-items: center; gap: 40px; margin: 8px 0 34px; }
.agent-balance-card p { margin: 0 0 10px; }
.agent-balance-card strong { font-size: 38px !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
.agent-balance-card small { display: block; color: #657187; margin-top: 10px; }
.agent-balance-card button { margin-left: auto; white-space: nowrap; }
.agent-page h1, .agents-panel h2 { font-size: 23px !important; font-weight: 700 !important; margin: 0; }
.agent-page h2, .agent-dialog h2, .agents-panel h3 { font-size: 19px !important; font-weight: 700 !important; }
.agent-page .agent-help, .agent-dialog .agent-help { color: #657187; line-height: 1.8; }
.agent-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 20px 0; flex-wrap: wrap; }
.agent-toolbar form, .agent-inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agent-toolbar input { min-width: 220px; }
.agent-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.agent-table-wrap table { width: 100%; border-collapse: collapse; }
.agent-table-wrap th { background: #f8fafc; color: #536075; text-align: left; }
.agent-table-wrap th, .agent-table-wrap td { padding: 17px 18px; border-bottom: 1px solid #edf0f4; line-height: 1.6; vertical-align: middle; }
.agent-table-wrap tr:last-child td { border-bottom: 0; }
.agent-table-wrap small { display: block; color: #657187; margin-top: 4px; }
.agent-empty { text-align: center; padding: 46px 20px !important; color: #657187; }
.agent-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 18px 0 26px; }
.agent-dialog { width: min(580px,calc(100vw - 32px)); padding: 28px; border: 0; border-radius: 16px; box-shadow: 0 24px 70px #14203530; }
.agent-dialog::backdrop { background: #14203565; }
.agent-dialog-heading, .agent-dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent-dialog-heading { margin-bottom: 22px; }
.agent-dialog-heading h2 { margin: 0; }
.agent-dialog-heading button { background: transparent; border: 0; font-size: 26px !important; padding: 0 8px; }
.agent-dialog-actions { justify-content: flex-end; margin-top: 24px; }
.agent-dialog label, .agent-account-form label { display: grid; gap: 9px; margin: 17px 0; }
.agent-dialog input,.agent-dialog select,.agent-dialog textarea,.agent-toolbar input,.agent-account-form input { width: 100%; padding: 11px 13px; background: #fff; border: 1px solid #d8dee8; border-radius: 8px; min-height: 42px; }
.agent-quote { margin-top: 18px; padding: 18px; border-radius: 10px; background: #fff2e9; line-height: 1.9; }
.agent-quote strong { color: #c64112; font-size: 23px !important; font-weight: 700 !important; }
.agent-positive { color: #087849; }.agent-negative { color: #c64112; }
.agent-account-form { max-width: 520px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 22px; }
.agent-notice { position: fixed; right: 28px; bottom: 24px; padding: 16px 22px; background: #172437; color: #fff; border-radius: 10px; max-width: calc(100vw - 40px); z-index: 100; }
.agent-boot-message { padding: 48px; text-align: center; }
.agents-panel .agent-section { margin-top: 32px; }
.agent-price-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; }
.agent-price-card { background: #fff; padding: 22px; border: 1px solid var(--line); border-radius: 12px; }
.agent-price-card h3 { margin: 0 0 12px; }.agent-price-card p { color: #657187; line-height: 1.8; }
.agent-details-tabs { margin: 22px 0; }
.agent-page button:disabled,.agent-dialog button:disabled { opacity: .55; cursor: not-allowed; }
.agent-page :focus-visible,.agent-dialog :focus-visible { outline: 3px solid #3478f6; outline-offset: 3px; }
@media(max-width:900px) { .agent-main { padding: 0 20px 24px; }.agent-shell { grid-template-columns: 180px minmax(0,1fr); }.agent-balance-card { flex-wrap: wrap; gap: 20px; padding: 22px; }.agent-balance-card button { margin-left: 0; } }
@media(max-width:900px) { .agent-login-intro { padding: 40px 32px; }.agent-login-panel { padding: 32px; } }
@media(max-width:640px) { .agent-login { display: block; }.agent-login-intro { padding: 28px; gap: 24px; }.agent-login-intro > div:not(.agent-brand), .agent-login-footnote { display: none; }.agent-login-panel { padding: 40px 24px; }.agent-owner-preview form { margin-left: 0; width: 100%; }.agent-owner-preview input { min-width: 0; flex: 1; } }
@media(max-width:640px) { .agent-shell { display: block; }.agent-sidebar { padding: 16px; gap: 18px; }.agent-sidebar nav { grid-template-columns: repeat(4,1fr); gap: 4px; }.agent-sidebar nav button { padding: 10px 4px; text-align: center; }.agent-contact { display: none; }.agent-brand img { width: 32px; height: 32px; }.agent-brand small { display: inline; margin-left: 14px; }.agent-main { padding: 0 16px 24px; }.agent-topbar { min-height: 68px; }.agent-balance-card { margin-top: 0; }.agent-toolbar form { width: 100%; }.agent-toolbar input { min-width: 0; flex: 1; }.agent-table-wrap th,.agent-table-wrap td { padding: 13px 12px; min-width: 110px; } }
.agent-topbar { flex-wrap:wrap; padding:14px 0; }
#agent-search { flex-wrap:nowrap; }
#agent-search input { width:260px; }
#agent-search button { white-space:nowrap; }
.agent-topbar .agent-owner-preview { padding:0; border:0; background:transparent; margin:0 auto 0 0; gap:10px; }
.agent-topbar .agent-owner-preview input { width:180px; }
.agent-topbar .agent-owner-preview select { max-width:245px; }
.agent-topbar .agent-owner-preview form { margin-left:0; flex-wrap:nowrap; }
@media(max-width:1150px) { .agent-products { gap:14px; }.agent-product { padding:20px; }.agent-product[data-tier="PRO"] { padding:19px; }.agent-product[data-tier="FLAGSHIP"] { padding-top:17px; }.agent-product-top { flex-wrap:wrap; } }
@media(max-width:820px) { .agent-products { grid-template-columns:1fr; }.agent-shop-heading { align-items:flex-start; flex-direction:column; }.agent-topbar .agent-owner-preview { width:100%; }.agent-pending-banner { flex-direction:column; align-items:flex-start; } }
/* Brand customer support settings */
.agent-support-card{max-width:760px;background:#fff;border:1px solid #dfe7f3;border-radius:16px;padding:28px}.agent-support-card h2{margin:0 0 12px;font-size:20px}.agent-support-card .agent-help{line-height:1.8}.agent-support-preview{display:flex;align-items:center;justify-content:center;width:280px;height:280px;max-width:100%;margin:26px 0 20px;border:1px solid #dfe7f3;border-radius:12px;background:#fff;padding:12px;box-sizing:border-box}.agent-support-preview img{width:100%;height:100%;object-fit:contain}.agent-support-preview p{font-size:14px;color:#6f7f9c}.agent-support-preview [hidden]{display:none!important}.agent-support-picker{display:flex;gap:12px;flex-direction:column;font-size:14px;font-weight:600}.agent-support-picker input{max-width:100%;font-weight:400}.agent-support-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.agent-support-actions [hidden]{display:none}@media(max-width:600px){.agent-support-card{padding:20px}.agent-support-preview{width:248px;height:248px}}

/* BEGIN ALIPAY RECHARGE */
.agent-recharge { background:#fff;border:1px solid #e3eaf5;border-radius:14px;padding:26px;margin-bottom:28px;color:#172b4d; }
.ar-heading,.ar-confirm,.ar-orders-heading { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.ar-heading h2 { margin:0 0 8px;font-size:21px; }.ar-heading p { margin:0;color:#64748b; }.ar-method { color:#1677ff;font-weight:600;white-space:nowrap; }
.ar-packages { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;border:0;padding:0;margin:24px 0; }
.agent-recharge .ar-package { position:relative;border:1px solid #dce4f0;border-radius:10px;padding:22px 16px;cursor:pointer;display:flex;flex-direction:column;gap:10px;background:#fff;margin:0;min-height:112px;box-sizing:border-box; }
.ar-package:has(input:checked) { border:2px solid #2866f5;padding:21px 15px;background:#f4f7ff;box-shadow:0 0 0 2px #eaf0ff; }
.ar-package:has(input:focus-visible) { outline:2px solid #173da2;outline-offset:3px; }.agent-recharge .ar-package input { position:absolute;top:16px;right:16px;accent-color:#2866f5;width:16px;height:16px;min-height:0;padding:0;margin:0;box-shadow:none; }
.agent-recharge .ar-amount { font-size:27px!important;font-weight:700!important;color:#172b4d; }.ar-points { color:#586b87;font-size:14px; }.ar-points strong { color:#2866f5; }
.ar-confirm { padding:18px 20px;background:#f7f9fd;border-radius:10px; }.ar-confirm small { display:block;margin-top:7px;color:#64748b;font-size:12px; }
.ar-status { color:#2866f5;min-height:20px; }.agent-recharge [data-ar-error]:empty,.agent-recharge .ar-status:empty { display:none; }.ar-orders-heading { margin-top:26px; }.ar-orders-heading h3 { font-size:16px; }.ar-order-scroll { overflow-x:auto; }.ar-order-scroll table { width:100%;border-collapse:collapse;font-size:13px; }.ar-order-scroll th,.ar-order-scroll td { padding:12px 10px;border-bottom:1px solid #edf0f6;text-align:left; }.ar-order-scroll td small { display:block;margin-top:5px;color:#64748b;word-break:break-all; }.ar-order-scroll button { margin:3px;white-space:nowrap; }.ar-empty { text-align:center;padding:20px;color:#64748b; }
.ar-sr { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
@media(min-width:1500px) { .ar-packages { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:700px) { .agent-recharge { padding:18px; }.ar-packages { grid-template-columns:repeat(2,minmax(0,1fr)); }.ar-confirm { align-items:stretch;flex-direction:column; }.agent-recharge .ar-amount { font-size:23px!important; }.ar-heading { align-items:flex-start; }.ar-method { font-size:12px; } }
/* END ALIPAY RECHARGE */
