:root { color-scheme: light; font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; color: #162033; background: #f4f7fb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f7fb; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { color: #33415c; font-family: Consolas, monospace; overflow-wrap: anywhere; }
.muted { color: #6d7789; line-height: 1.7; }
.eyebrow { margin: 0 0 8px; color: #5270ec; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.brand-mark { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; font-weight: 900; background: linear-gradient(135deg, #5270ec, #7250f2); box-shadow: 0 12px 24px rgba(82,112,236,.28); }
.blue-whale-logo { display: block; position: relative; flex: 0 0 auto; width: 46px; height: 46px; overflow: hidden; border: 2px solid rgba(113,141,207,.35); border-radius: 14px; background: #fff; box-shadow: 0 9px 22px rgba(24,123,191,.24); }
.blue-whale-logo img { position: absolute; top: -20px; left: -10px; width: 68px; max-width: none; height: auto; }
.login-whale-logo { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 14px 34px rgba(24,123,191,.25); }
.login-whale-logo img { top: -22px; left: -12px; width: 100px; }

.login-body { display: grid; position: relative; place-items: center; overflow-x: hidden; background: #053a63 url('../images/ocean-login-bg.svg') center / cover no-repeat fixed; }
.login-body::before { position: fixed; inset: 0; content: ""; pointer-events: none; background: linear-gradient(120deg, rgba(1,25,50,.28), rgba(12,119,168,.08) 48%, rgba(0,52,92,.32)); }
.login-shell { position: relative; z-index: 1; width: min(100% - 32px, 430px); padding: 32px 0; }
.login-panel { padding: 36px 38px 38px; border: 1px solid rgba(255,255,255,.7); border-radius: 28px; background: rgba(255,255,255,.9); box-shadow: 0 28px 90px rgba(0,40,72,.28); backdrop-filter: blur(18px); }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-brand h1 { margin: 14px 0 0; color: #064e78; font-size: 34px; letter-spacing: .16em; text-indent: .16em; }
.login-brand p { margin: 7px 0 0; color: #5f7890; font-size: 14px; font-weight: 700; letter-spacing: .36em; text-indent: .36em; }
.login-whale-logo { width: 84px; height: 84px; border: 3px solid rgba(255,255,255,.92); border-radius: 25px; box-shadow: 0 16px 38px rgba(4,108,166,.32); }
.login-whale-logo img { top: -24px; left: -13px; width: 110px; }
.login-form { display: grid; gap: 9px; margin-top: 28px; }
.login-form label { margin-top: 8px; color: #24445e; font-size: 14px; font-weight: 800; }
.login-form input[type="text"], .login-form input[type="password"] { width: 100%; min-height: 49px; padding: 13px 15px; border: 1px solid rgba(67,128,163,.25); border-radius: 13px; outline: none; background: rgba(249,253,255,.88); color: #12344e; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.login-form input[type="text"]:focus, .login-form input[type="password"]:focus { border-color: #0d94ca; background: #fff; box-shadow: 0 0 0 4px rgba(13,148,202,.13); }
.login-form input:focus, input:focus, select:focus, textarea:focus { border-color: #6680ee; box-shadow: 0 0 0 4px rgba(82,112,236,.12); outline: none; }
.checkbox-row, .checkbox-field { display: flex !important; align-items: center; gap: 9px; }
.login-form .checkbox-row { margin-top: 11px; color: #587087; font-size: 13px; font-weight: 650; }
.login-form .checkbox-row input { width: 16px; height: 16px; accent-color: #078dc4; }
.login-form button { min-height: 50px; margin-top: 14px; padding: 14px; border: 0; border-radius: 13px; color: #fff; font-size: 16px; font-weight: 850; letter-spacing: .16em; background: linear-gradient(135deg, #08a2d5, #0879bf 55%, #075f9f); box-shadow: 0 12px 26px rgba(2,111,169,.27); transition: transform .18s ease, box-shadow .18s ease; }
.login-form button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(2,111,169,.34); }
@media (max-width: 520px) {
    .login-body { background-position: 58% center; }
    .login-shell { width: min(100% - 24px, 430px); padding: 18px 0; }
    .login-panel { padding: 28px 24px 30px; border-radius: 23px; }
    .login-brand h1 { font-size: 30px; }
}
.alert, .notice { padding: 12px 14px; border: 1px solid; border-radius: 12px; }
.alert, .notice.danger { color: #a02a2a; border-color: #ffc7c7; background: #fff1f1; }
.notice.success { color: #126644; border-color: #b8ead5; background: #edfbf5; }

.app-frame { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #52658f #17213a; color: #dce5ff; background: #17213a; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: #17213a; }
.sidebar::-webkit-scrollbar-thumb { border: 2px solid #17213a; border-radius: 999px; background: #52658f; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #6f83b0; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand small { margin-top: 3px; color: #8fa0c8; font-size: 11px; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav a { padding: 12px 14px; border-radius: 11px; color: #aebddd; font-weight: 700; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #fff; background: rgba(112,137,232,.22); }
.sidebar-group summary { padding: 12px 14px; border-radius: 11px; color: #aebddd; font-weight: 800; cursor: pointer; list-style: none; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary::after { float: right; content: "+"; }
.sidebar-group[open] summary::after { content: "−"; }
.sidebar-group summary.active { color: #fff; background: rgba(112,137,232,.16); }
.sidebar-group > div { display: grid; gap: 4px; padding: 5px 0 5px 12px; }
.sidebar-group > div a { padding: 9px 12px; font-size: 13px; }
.sidebar-backdrop, .mobile-nav-toggle { display: none; }
.app-main { min-width: 0; }
.topbar { display: flex; position: sticky; z-index: 10; top: 0; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 28px; border-bottom: 1px solid #e5e9f1; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.topbar-leading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.topbar-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; margin-left: 10px; }
.topbar-tool { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 10px; border: 0; border-radius: 8px; color: #687386; background: transparent; cursor: pointer; }
.topbar-tool:hover { color: #5065ef; background: #eef1ff; }
.topbar-tool:focus-visible { outline: 2px solid #5065ef; outline-offset: 2px; }
.topbar-tool:disabled { opacity: .45; cursor: wait; }
.topbar-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ghost-button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; color: #fff; font-weight: 750; background: #5270ec; }
.ghost-button, .button.ghost { color: #344055; border-color: #dce2ed; background: #fff; }
.button.secondary { color: #425172; border-color: #d8def0; background: #eef2ff; }
.button.danger { background: #c94a4a; }
.button.small { min-height: 32px; padding: 6px 10px; border-radius: 7px; font-size: 12px; }
.button:disabled { cursor: wait; opacity: .55; }
.page-shell { width: min(100% - 40px, 1500px); margin: 28px auto 60px; }
.page-shell > .notice { margin-bottom: 16px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading h1 { margin: 0; font-size: clamp(26px,3vw,36px); }
.page-heading p:last-child { margin-bottom: 0; }

.hero-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px; border-radius: 22px; color: #fff; background: linear-gradient(120deg,#1d2b64,#5270ec 58%,#7250f2); box-shadow: 0 20px 50px rgba(39,61,136,.22); }
.hero-card h1 { margin: 0; font-size: clamp(26px,4vw,38px); }
.hero-card .muted, .hero-card .eyebrow { color: rgba(255,255,255,.76); }
.balance-block { min-width: 180px; padding: 18px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.1); }
.balance-block span, .balance-block strong { display: block; }
.balance-block strong { margin-top: 6px; font-size: 26px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 20px; }
.metric-grid.compact { margin: 0 0 20px; }
.dashboard-mobile-companion { display: none; }
.metric-card, .panel, .table-panel, .form-panel, .filter-panel { border: 1px solid #e5e9f1; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(39,51,81,.06); }
.metric-card { position: relative; overflow: hidden; padding: 22px; }
.metric-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: var(--accent); }
.metric-card span, .metric-card small { color: #788195; }
.metric-card strong { display: block; margin: 12px 0 6px; font-size: 26px; }
.accent-blue { --accent: #5270ec; }.accent-violet { --accent: #8857e8; }.accent-green { --accent: #22a06b; }.accent-orange { --accent: #e88737; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.link-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.promotion-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 14px; border-bottom: 2px solid #4676ea; }
.promotion-tabs a { flex: 0 0 auto; padding: 9px 14px; border-radius: 8px 8px 0 0; color: #2b3857; font-weight: 800; }
.promotion-tabs a:hover { color: #2f61dd; background: #edf3ff; }
.promotion-tabs a.active { color: #fff; background: #4676ea; box-shadow: 0 4px 10px rgba(70,118,234,.25); }
.promotion-card { position: relative; margin-top: 20px; min-height: 430px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.promotion-card-actions { position: absolute; top: 20px; left: 20px; }
.promotion-qr { width: 260px; height: 260px; margin: 25px auto 18px; }
.promotion-qr canvas, .promotion-qr img { width: 260px !important; height: 260px !important; }
.promotion-url { max-width: min(760px,90%); color: #2f61dd; overflow-wrap: anywhere; }
.promotion-buttons { margin-top: 22px; justify-content: center; }
.promotion-empty { display: grid; gap: 8px; color: #7a849b; }
.promotion-empty strong { color: #26324b; font-size: 18px; }
.legacy-setting-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.promotion-price-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.promotion-price-pair-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 14px; }
.promotion-price-switches { display: flex; flex-wrap: wrap; gap: 12px; }
.promotion-price-pair .promotion-price-switches label { margin: 0; white-space: nowrap; }
.promotion-price-pair label.promotion-price-input { display: block; min-width: 0; margin: 0; }
.promotion-price-pair .promotion-price-input { grid-column: 1; grid-row: 1; }
.promotion-price-pair .promotion-price-switches { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.legacy-setting-item { min-width: 0; padding: 16px; border: 1px solid #e5e9f1; border-radius: 12px; font-weight: 800; }
.legacy-setting-item input:not([type=radio]) { width: 100%; margin-top: 9px; }
.legacy-setting-item small { display: block; margin-top: 8px; color: #f09a22; font-weight: 600; }
fieldset.legacy-setting-item { margin: 0; }
fieldset.legacy-setting-item label { display: inline-flex; align-items: center; gap: 6px; margin: 10px 14px 0 0; }
.theme-display-setting form { display: flex; align-items: center; gap: 20px; }
.theme-display-setting fieldset { display: flex; gap: 18px; border: 0; padding: 0; margin: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-top: 20px; }
.theme-card { overflow: hidden; }
.theme-preview { min-height: 390px; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 16px; color: #fff; text-align: center; }
.theme-preview span { margin-bottom: auto; font-size: 18px; font-weight: 900; }
.theme-preview strong { font-size: 20px; }
.theme-preview i { width: 80%; padding: 12px; border-radius: 999px; background: rgba(255,255,255,.9); color: #2b3857; font-style: normal; font-weight: 900; }
.theme-card-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-weight: 900; }
.theme-red { background: linear-gradient(165deg,#8d0018,#f04444); }
.theme-magenta { background: linear-gradient(165deg,#7a1045,#dc3b7e); }
.theme-lilac { background: linear-gradient(165deg,#7653b8,#c9a4ff); }
.theme-dark { background: linear-gradient(165deg,#111827,#4b5563); }
.theme-red-gradient { background: linear-gradient(165deg,#ff416c,#ff4b2b); }
.theme-green-gradient { background: linear-gradient(165deg,#11998e,#38ef7d); }
.theme-blue-gradient { background: linear-gradient(165deg,#396afc,#2948ff); }
.theme-pink-gradient { background: linear-gradient(165deg,#ee9ca7,#ffdde1); }
.theme-yellow-gradient { background: linear-gradient(165deg,#f7971e,#ffd200); }
.theme-gray-gradient { background: linear-gradient(165deg,#606c88,#3f4c6b); }
.theme-orange-gradient { background: linear-gradient(165deg,#f12711,#f5af19); }
.theme-purple-gradient { background: linear-gradient(165deg,#654ea3,#eaafc8); }
.link-card { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.link-card code { display: block; min-height: 54px; padding: 12px; border-radius: 10px; white-space: normal; background: #f6f8fc; }
.link-card small { color: #7a8598; }
.panel { padding: 24px; }
.panel.slim { padding: 14px 16px; }
.panel-heading, .toolbar, .table-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading { margin-bottom: 18px; }
.panel h2 { margin: 0; font-size: 21px; }
.status-dot { color: #17895b; font-size: 13px; font-weight: 700; }
.status-dot::before { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; content: ""; background: #22a06b; }
.stat-list { display: grid; gap: 2px; }
.stat-list div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid #eef1f6; }
.stat-list div:last-child { border-bottom: 0; }
.stat-list span { color: #6d7789; }
.dashboard-announcement-count { padding: 4px 9px; border-radius: 999px; color: #4566c7; font-size: 12px; font-weight: 800; background: #edf2ff; }
.dashboard-announcement-list { display: grid; }
.dashboard-announcement-item { padding: 12px 0; border-bottom: 1px solid #eef1f6; }
.dashboard-announcement-item:first-child { padding-top: 0; }
.dashboard-announcement-item:last-child { padding-bottom: 0; border-bottom: 0; }
.dashboard-announcement-item > div { display: flex; align-items: center; gap: 8px; }
.dashboard-announcement-item strong { overflow: hidden; color: #26344f; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-announcement-item small { display: block; margin-top: 5px; color: #929bad; font-size: 11px; }
.dashboard-announcement-item p { margin: 6px 0 0; overflow: hidden; color: #69758a; font-size: 12px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-announcement-top { flex: 0 0 auto; padding: 2px 6px; border-radius: 4px; color: #b45b12; font-size: 10px; font-weight: 850; background: #fff0d8; }
.dashboard-announcement-empty { display: grid; min-height: 190px; place-items: center; color: #929bad; font-size: 13px; }

.filter-panel { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 14px; margin-bottom: 20px; padding: 18px; }
.filter-panel.short { grid-template-columns: repeat(2,minmax(180px,260px)) auto; }
.order-filter-panel { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 11px; padding: 15px 18px; }
.order-filter-panel label { min-width: 0; flex: 0 1 155px; }
.order-filter-panel .order-filter-select { flex-basis: 145px; }
.order-filter-panel .order-filter-wide { flex-basis: 190px; }
.order-filter-panel .order-filter-narrow { flex-basis: 120px; }
.order-filter-panel .order-filter-compact { flex-basis: 145px; }
.order-filter-panel .order-filter-ip { flex-basis: 175px; }
.order-filter-panel .filter-actions { flex: 0 0 auto; align-items: flex-end; white-space: nowrap; }
.filter-panel label, .form-grid label { display: grid; gap: 7px; color: #46536a; font-size: 13px; font-weight: 750; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid #dce2ed; border-radius: 9px; color: #1f2b40; background: #fff; }
select[multiple] { min-height: 130px; }
textarea { resize: vertical; }
.filter-actions, .form-actions { display: flex; align-items: end; gap: 8px; }
.toolbar { margin-bottom: 16px; }
.table-panel { overflow: hidden; }
.table-summary { padding: 16px 18px; border-bottom: 1px solid #edf0f5; }
.order-table-summary { display: grid; grid-template-columns: minmax(130px,1fr) auto minmax(250px,1fr); gap: 14px; padding: 11px 18px; }
.order-table-summary > strong { justify-self: end; }
.order-summary-actions { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 8px; }
.order-summary-actions form { margin: 0; }
.order-summary-actions .button { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.order-backfill-status { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 12px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; white-space: nowrap; }
th { color: #667189; font-size: 12px; letter-spacing: .02em; background: #f8f9fc; }
td small, td code { display: block; }
td small { margin-top: 5px; color: #8a93a4; white-space: normal; }
tbody tr:hover { background: #fafbfe; }
.actions { display: flex; align-items: center; gap: 10px; }
.actions a:not(.button), .link { color: #4968df; font-weight: 750; }
.link { padding: 0; border: 0; background: transparent; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-form input, .inline-form select { width: auto; min-width: 68px; padding: 6px 8px; }
.danger-text { color: #bd3e3e !important; }
.success-text { color: #147650 !important; }
.empty { padding: 34px; color: #7e899d; text-align: center; }
.pill { display: inline-flex; align-items: center; margin: 2px; padding: 5px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.pill.success { color: #147650; background: #e8f8f1; }.pill.danger { color: #aa3333; background: #fdecec; }.pill.neutral { color: #536078; background: #eef1f6; }
.order-agent-note { display: inline-block; max-width: 150px; overflow: hidden; color: #5d687c; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.order-type-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 9px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.order-type-badge.single { color: #2457bd; border-color: #cbd9ff; background: #eaf0ff; }
.order-type-badge.hour { color: #7040ae; border-color: #ddc9f6; background: #f2eafd; }
.order-type-badge.day { color: #147650; border-color: #bde7d4; background: #e7f8f0; }
.order-type-badge.week { color: #a45a08; border-color: #f1d2a6; background: #fff2df; }
.order-type-badge.month { color: #b43750; border-color: #f2c5cf; background: #fdebf0; }
.order-type-badge.unknown { color: #536078; border-color: #dfe4ec; background: #eef1f6; }
.pagination { padding: 13px 16px; }
.pagination-shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.pagination-summary { margin: 0; color: #748096; font-size: 13px; white-space: nowrap; }
.pagination-summary strong { color: #26344e; font-size: 14px; }
.pagination-summary span { margin-left: 10px; }
.pagination-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.pagination-button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 32px; padding: 6px 10px; border: 1px solid #dce2ed; border-radius: 7px; color: #4c5a72; font-size: 13px; font-weight: 750; background: #fff; transition: .16s ease; }
a.pagination-button:hover { border-color: #9eafe0; color: #3658cc; background: #f2f5ff; }
.pagination-button.active { border-color: #4968df; color: #fff; background: #4968df; box-shadow: 0 4px 10px rgba(73,104,223,.22); }
.pagination-button.disabled { color: #a1a9b7; background: #f5f6f8; cursor: not-allowed; }
.pagination-ellipsis { padding: 0 2px; color: #8c96a8; }

.form-panel { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid small { color: #7a8598; font-weight: 500; }
.form-actions { margin-top: 24px; }
.pay-setting-heading, .pay-setting-editor { width: min(100%,980px); }
.pay-setting-editor { padding: 0; overflow: hidden; border-radius: 10px; }
.pay-setting-section + .pay-setting-section { border-top: 1px solid #dfe5ee; }
.pay-setting-section-title { padding: 12px 18px; border-bottom: 1px solid #e3e8f0; color: #344159; font-size: 14px; font-weight: 850; background: #f4f6fa; }
.pay-setting-row { display: grid; grid-template-columns: 170px minmax(0,1fr); min-height: 58px; border-bottom: 1px solid #edf0f5; }
.pay-setting-row:last-child { border-bottom: 0; }
.pay-setting-row > label:first-child, .pay-setting-row-label { display: flex; align-items: center; justify-content: flex-end; padding: 12px 18px; border-right: 1px solid #e3e8f0; color: #3f4d63; font-size: 13px; font-weight: 750; text-align: right; background: #fafbfc; }
.pay-setting-control { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 9px 14px; }
.pay-setting-control > input, .pay-setting-control > select { width: min(100%,610px); min-height: 39px; }
.pay-setting-control > .pay-setting-wide-input { width: 100%; }
.pay-setting-control > small { color: #8390a3; font-size: 12px; font-weight: 500; }
.pay-setting-toggle-control { flex-wrap: wrap; }
.pay-setting-switch { flex: 0 0 48px; cursor: pointer; }
.pay-setting-switch-state { min-width: 32px; color: #8b95a5; font-size: 13px; }
.pay-setting-switch-state.is-on { color: #249660; }
.pay-setting-actions { margin: 0; padding: 16px 18px; border-top: 1px solid #e3e8f0; background: #fafbfc; }
.agent-editor-heading { max-width: 980px; }
.agent-editor-form { width: min(100%,980px); padding: 0; overflow: visible; border-radius: 12px; }
.agent-form-list { padding: 20px 30px 12px; }
.agent-form-row { display: grid; grid-template-columns: 120px minmax(0,520px); align-items: start; gap: 18px; min-height: 58px; padding: 8px 0; }
.agent-form-row > label { padding-top: 11px; color: #344055; font-size: 13px; font-weight: 750; text-align: right; }
.agent-form-field { position: relative; min-width: 0; }
.agent-form-field > input, .agent-form-field > select { min-height: 42px; border-radius: 6px; }
.agent-form-field-compact { width: min(100%,230px); }
.agent-input-unit { display: flex; align-items: center; gap: 12px; }
.agent-input-unit input { width: 158px; min-height: 42px; border-radius: 6px; }
.agent-input-unit span { color: #5e687a; font-size: 13px; white-space: nowrap; }
.agent-form-tip { display: block; margin-top: 6px; color: #8791a2; font-size: 12px; font-weight: 500; line-height: 1.55; }
.agent-form-tip.emphasis { color: #ff7800; }
.field-error { display: block; margin-top: 6px; color: #c74040; font-size: 12px; }
.agent-channel-dropdown { position: relative; width: 100%; }
.agent-channel-dropdown summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 9px 13px; border: 1px solid #dce2ed; border-radius: 6px; color: #1f2b40; background: #fff; cursor: pointer; list-style: none; }
.agent-channel-dropdown summary::-webkit-details-marker { display: none; }
.agent-channel-dropdown summary i { width: 8px; height: 8px; margin: -4px 3px 0 14px; border-right: 2px solid #a3aab5; border-bottom: 2px solid #a3aab5; transform: rotate(45deg); transition: transform .18s ease; }
.agent-channel-dropdown[open] summary { border-color: #6680ee; box-shadow: 0 0 0 4px rgba(82,112,236,.12); }
.agent-channel-dropdown[open] summary i { margin-top: 4px; transform: rotate(225deg); }
.agent-channel-options { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 100%; max-height: 260px; overflow-y: auto; padding: 7px; border: 1px solid #dce2ed; border-radius: 8px; background: #fff; box-shadow: 0 14px 35px rgba(31,43,64,.18); }
.agent-channel-options label { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 38px; padding: 7px 9px; border-radius: 6px; color: #344055; cursor: pointer; }
.agent-channel-options label:hover { background: #f1f4ff; }
.agent-channel-options input { width: 16px; height: 16px; accent-color: #5270ec; }
.agent-channel-options span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.agent-channel-options small { color: #8b95a6; font-size: 11px; }
.agent-channel-options p { margin: 5px; color: #8b95a6; font-size: 12px; }
.agent-option-switches { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; min-height: 42px; }
.agent-option-switches label { display: inline-flex; align-items: center; gap: 7px; color: #46536a; font-size: 13px; font-weight: 650; }
.agent-option-switches input[type="checkbox"] { width: 16px; height: 16px; accent-color: #5270ec; }
.agent-editor-actions { margin: 8px 0 0; padding: 18px 168px 22px; border-top: 1px solid #edf0f5; background: #fbfcfe; }
.avatar-preview { width: 76px; height: 76px; margin-top: 8px; border: 1px solid #dce2ed; border-radius: 14px; object-fit: cover; }
.rule-tree { display: grid; gap: 8px; padding: 14px 0; }
.rule-tree label { display: flex; align-items: center; gap: 10px; min-height: 38px; border-bottom: 1px solid #eef1f6; color: #344055; font-weight: 700; }
.rule-tree input { width: auto; }
.rule-tree code { margin-left: 8px; color: #7a8598; font-weight: 500; }
.setting-section { margin-bottom: 18px; }
.sticky-actions { position: sticky; z-index: 8; bottom: 14px; justify-content: flex-end; padding: 14px; border: 1px solid #dfe5f0; border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(39,51,81,.12); backdrop-filter: blur(12px); }
.bulk-create { margin-bottom: 16px; }
.bulk-create summary { cursor: pointer; font-weight: 800; }
.bulk-create form { margin-top: 20px; }
.inline-details { position: relative; }
.inline-details summary { color: #4968df; cursor: pointer; font-weight: 750; list-style: none; }
.inline-details form { display: grid; position: absolute; z-index: 12; right: 0; width: 230px; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid #dce2ed; border-radius: 12px; background: #fff; box-shadow: 0 14px 36px rgba(37,49,79,.18); }
.compact-heading { margin-bottom: 12px; }
.video-list-panel { overflow: visible; }
.video-search-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 16px; border-bottom: 1px solid #edf0f5; }
.video-search-toolbar label { display: grid; min-width: 130px; gap: 6px; color: #46536a; font-size: 12px; font-weight: 800; }
.video-search-toolbar label:first-child { min-width: 215px; }
.video-search-toolbar select[multiple] { min-height: 42px; max-height: 90px; }
.legacy-table-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #edf0f5; background: #fbfcff; }
.legacy-table-toolbar .button { min-height: 32px; padding: 6px 10px; border-radius: 7px; font-size: 12px; }
.legacy-video-table th, .legacy-video-table td { text-align: center; }
.legacy-video-table .video-title-cell { min-width: 280px; max-width: 420px; text-align: left; white-space: normal; }
.row-check, #select-all { width: auto; }
.video-preview-button { padding: 0; border: 0; border-radius: 8px; background: transparent; }
.video-preview-button img { display: block; border-radius: 7px; object-fit: cover; background: #eef1f6; }
.video-preview-button:disabled { cursor: not-allowed; opacity: .5; }
.inline-toggle-form { display: flex; justify-content: center; }
.switch-control { display: inline-flex; position: relative; width: 48px; height: 25px; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-control span { width: 100%; border-radius: 999px; background: #cfd5e0; transition: .2s ease; }
.switch-control span::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; content: ""; background: #fff; box-shadow: 0 2px 5px rgba(31,43,64,.25); transition: .2s ease; }
.switch-control input:checked + span { background: #42b983; }
.switch-control input:checked + span::after { transform: translateX(23px); }
.personal-settings-heading { margin-bottom: 14px; }
.personal-settings-panel, .personal-data-cleanup { margin-bottom: 18px; overflow: hidden; }
.personal-settings-panel .panel-heading, .personal-data-cleanup .panel-heading { padding: 18px 22px; border-bottom: 1px solid #e8ebf0; }
.personal-settings-form { padding: 4px 22px 8px; }
.personal-setting-row { display: grid; grid-template-columns: 132px minmax(280px, 1fr) minmax(210px, .75fr); gap: 18px; padding: 12px 0; align-items: center; border-bottom: 1px solid #f0f2f5; }
.personal-setting-row:last-child { border-bottom: 0; }
.personal-setting-row > label { color: #3d485b; font-size: 13px; font-weight: 800; text-align: right; }
.personal-setting-row input:not([type="checkbox"]) { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d9dee7; border-radius: 6px; color: #2d3748; background: #fff; }
.personal-setting-row input[readonly] { color: #697386; background: #f7f8fa; }
.personal-setting-row small { color: #8a94a5; font-size: 12px; line-height: 1.55; }
.personal-password-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.personal-switch-line { display: flex; align-items: center; gap: 12px; }
.personal-switch-line b { color: #526077; font-size: 13px; }
.personal-settings-actions { padding: 16px 22px 20px; border-top: 1px solid #edf0f4; }
.personal-cleanup-warning { display: flex; margin: 18px 22px; padding: 13px 15px; align-items: flex-start; gap: 12px; border: 1px solid #ffd99c; border-radius: 8px; color: #79520e; background: #fff8e9; }
.personal-cleanup-warning strong { flex: 0 0 auto; }
.personal-cleanup-warning span { font-size: 13px; line-height: 1.65; }
.personal-cleanup-options { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 0 22px 18px; }
.personal-cleanup-options > label { position: relative; cursor: pointer; }
.personal-cleanup-options input { position: absolute; opacity: 0; pointer-events: none; }
.personal-cleanup-options span { display: flex; min-height: 82px; padding: 14px 16px; justify-content: center; flex-direction: column; gap: 6px; border: 1px solid #dfe4ec; border-radius: 8px; color: #465268; background: #fafbfd; transition: .18s ease; }
.personal-cleanup-options strong { font-size: 14px; }
.personal-cleanup-options small { color: #8a94a5; font-size: 12px; }
.personal-cleanup-options input:checked + span { border-color: #1677ff; color: #075fbd; background: #eef6ff; box-shadow: 0 0 0 2px rgba(22,119,255,.08); }
.admin-dialog { width: min(92vw,760px); padding: 0; border: 0; border-radius: 16px; color: #162033; box-shadow: 0 24px 80px rgba(28,39,67,.28); }
.admin-dialog::backdrop { background: rgba(18,27,46,.58); backdrop-filter: blur(3px); }
.cache-dialog { width: min(420px,calc(100vw - 32px)); background: #fff; }
.cache-dialog-body { padding: 26px 24px 20px; text-align: center; }
.cache-dialog-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 18px; color: #5865ed; background: #eef0ff; font-size: 34px; }
.cache-dialog-body p { margin: 0; color: #68758b; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.cache-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.cache-dialog-actions [hidden] { display: none; }
.cache-dialog button:disabled { opacity: .55; cursor: wait; }
.cache-dialog[data-state="success"] .cache-dialog-icon { color: #159966; background: #e8f8f0; }
.cache-dialog[data-state="error"] .cache-dialog-icon { color: #d75454; background: #fff0f0; }
.admin-dialog > form, .admin-dialog > .form-grid, .admin-dialog > .form-actions { margin: 0 22px 22px; }
.admin-dialog label { display: grid; gap: 7px; color: #46536a; font-size: 13px; font-weight: 750; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid #edf0f5; }
.dialog-heading h2 { margin: 0; font-size: 19px; }
.dialog-heading button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #69758b; font-size: 23px; background: #f1f3f8; }
.admin-dialog .form-grid { margin-top: 22px; }
.video-player-dialog { width: min(94vw,1000px); }
.video-player-dialog video { display: block; width: calc(100% - 44px); max-height: 72vh; margin: 22px; background: #0b1020; }
.legacy-article-table th, .legacy-article-table td { text-align: center; }
.legacy-article-table .article-title-cell { min-width: 320px; max-width: 520px; text-align: left; white-space: normal; }
.article-thumb-preview { width: 96px; height: 96px; border: 1px solid #dce2ed; border-radius: 14px; object-fit: cover; background: #f4f6fa; }
.agent-filter-panel { grid-template-columns: repeat(5,minmax(140px,1fr)); }
.agent-list-panel { overflow: visible; }
.agent-summary-table { min-width: 1280px; }
.agent-summary-table th, .agent-summary-table td { white-space: normal; vertical-align: top; }
.agent-summary-table th { position: sticky; z-index: 3; top: 0; }
.agent-summary-table .agent-check-column { width: 42px; text-align: center; }
.agent-identity-cell { min-width: 150px; }
.agent-identity-cell strong, .agent-identity-cell small, .agent-identity-cell a { display: block; }
.agent-identity-cell strong { color: #1e2a42; font-size: 15px; }
.agent-identity-cell a { margin-top: 8px; color: #4968df; font-weight: 750; }
.agent-id { display: inline-flex; margin-top: 5px; padding: 3px 7px; border-radius: 999px; color: #59667d; font-size: 11px; background: #eef1f6; }
.agent-balance { color: #147650; font-size: 17px; font-weight: 850; }
.agent-cell-stack { display: grid; min-width: 130px; gap: 7px; }
.agent-cell-stack span { line-height: 1.45; }
.agent-cell-stack b { display: inline-block; min-width: 46px; margin-right: 5px; color: #7b8597; font-size: 11px; }
.agent-cell-stack details summary { color: #4968df; cursor: pointer; font-size: 12px; font-weight: 750; }
.agent-metric-cell { min-width: 120px; }
.agent-status-form { justify-content: flex-start; }
.agent-actions-cell { position: relative; min-width: 170px; }
.agent-action-panel { margin-top: 9px; }
.agent-action-panel > summary { color: #4968df; cursor: pointer; font-weight: 800; }
.agent-action-list { display: grid; position: absolute; z-index: 20; right: 10px; width: 280px; gap: 9px; margin-top: 8px; padding: 14px; border: 1px solid #dce2ed; border-radius: 13px; background: #fff; box-shadow: 0 18px 42px rgba(37,49,79,.2); }
.agent-action-list details summary { color: #425172; cursor: pointer; font-weight: 750; }
.agent-action-list form { display: grid; gap: 8px; }
.agent-action-list details form { margin-top: 8px; }
.agent-link-box { margin-bottom: 18px; }
.agent-link-list { display: grid; gap: 12px; }
.agent-link-list > div { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e5e9f1; border-radius: 11px; background: #f8f9fc; }
.agent-link-list span { color: #56637a; font-weight: 800; }
.agent-link-list code { padding: 8px; border-radius: 8px; background: #fff; }
.balance-summary { padding: 9px 13px; border-radius: 9px; color: #fff; font-size: 13px; font-weight: 850; background: #e05656; }
.agent-search-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #e1e6ef; border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgba(39,51,81,.05); }
.agent-search-toolbar > input, .agent-search-toolbar > select { width: 150px; min-height: 36px; padding: 7px 10px; border-radius: 6px; font-size: 13px; background: #fbfcfe; }
.agent-search-toolbar > input:first-child { width: 190px; }
.agent-date-range { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 7px; border: 1px solid #dce2ed; border-radius: 6px; background: #fbfcfe; }
.agent-date-range span { color: #738096; font-size: 12px; font-weight: 750; white-space: nowrap; }
.agent-date-range input { width: 126px; padding: 4px 5px; border: 0; background: transparent; }
.agent-date-range i { color: #9aa3b2; font-size: 12px; font-style: normal; }
.agent-more-filters { position: relative; }
.agent-more-filters > summary { min-height: 36px; padding: 8px 11px; border: 1px solid #dce2ed; border-radius: 6px; color: #46536a; cursor: pointer; font-size: 13px; font-weight: 750; list-style: none; background: #fbfcfe; }
.agent-more-filters > div { display: grid; position: absolute; z-index: 20; top: 42px; right: 0; width: 260px; gap: 10px; padding: 14px; border: 1px solid #dce2ed; border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(37,49,79,.18); }
.agent-more-filters label { display: grid; gap: 5px; color: #56637a; font-size: 12px; font-weight: 750; }
.agent-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 18px 2px 10px; color: #536078; font-size: 13px; font-weight: 800; }
.agent-list-heading label { display: flex; align-items: center; gap: 7px; }
.agent-list-heading input { width: auto; }
.agent-card-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,620px),1fr)); align-items: start; gap: 12px; }
.agent-card { position: relative; width: 100%; max-width: 760px; min-width: 0; border: 1px solid #e1e6ef; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(39,51,81,.055); }
.agent-card:hover { border-color: #ccd6eb; box-shadow: 0 10px 28px rgba(39,51,81,.1); }
.agent-card-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px 12px; padding: 12px 14px; border-bottom: 1px solid #edf0f5; }
.agent-card-header > .row-check { grid-column: 1; grid-row: 1 / span 2; align-self: start; width: auto; margin-top: 4px; }
.agent-card-identity { grid-column: 2; grid-row: 1; min-width: 0; }
.agent-card-identity h2 { display: inline; margin: 0 8px 0 0; color: #202c44; font-size: 16px; }
.agent-card-identity span { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #57647b; font-size: 11px; font-weight: 800; background: #edf1f7; }
.agent-card-identity p { margin: 5px 0 0; color: #7b8597; font-size: 12px; }
.agent-card-hierarchy { display: flex; grid-column: 2; grid-row: 2; align-items: center; flex-wrap: wrap; gap: 3px 8px; }
.agent-card-hierarchy > span { color: #33415c; font-weight: 850; }
.agent-card-hierarchy small { color: #7b8597; }
.agent-card-hierarchy a { color: #4968df; font-size: 12px; font-weight: 750; }
.agent-card-status { display: flex; grid-column: 3; grid-row: 1; align-items: center; justify-content: flex-end; gap: 5px; }
.agent-card-actions { display: flex; position: relative; grid-column: 3; grid-row: 2; align-items: center; justify-content: flex-end; gap: 6px; }
.agent-card-actions .agent-action-panel { margin-top: 0; }
.agent-card-actions .agent-action-panel > summary { min-height: 32px; padding: 7px 10px; border: 1px solid #dce2ed; border-radius: 7px; list-style: none; background: #fff; }
.agent-kpi-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 11px 14px; }
.agent-kpi { min-width: 0; padding: 10px 11px; border-radius: 9px; background: #f7f9fc; }
.agent-kpi span, .agent-kpi small { display: block; color: #798397; }
.agent-kpi span { font-size: 12px; font-weight: 800; }
.agent-kpi strong { display: block; margin: 5px 0 3px; color: #23304a; font-size: 16px; white-space: nowrap; }
.agent-kpi small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-kpi.balance { background: #edf8f3; }.agent-kpi.balance strong { color: #147650; }
.agent-kpi.today { background: #eef3ff; }.agent-kpi.today strong { color: #3f60d8; }
.agent-kpi.yesterday { background: #f3efff; }.agent-kpi.yesterday strong { color: #7450c4; }
.agent-kpi.visits { background: #eef8fb; }.agent-kpi.visits strong { color: #27738a; }
.agent-kpi.deduction { background: #fff3eb; }.agent-kpi.deduction strong { color: #c2662f; }
.agent-kpi.rules { background: #fff6e8; }.agent-kpi.rules strong { color: #a66b16; }
.agent-card-footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 12px; padding: 10px 14px 12px; border-top: 1px dashed #e4e8f0; background: #fbfcfe; }
.agent-card-footer > div { min-width: 0; }
.agent-card-footer b, .agent-card-footer span { display: block; }
.agent-card-footer b { margin-bottom: 4px; color: #7a8496; font-size: 11px; }
.agent-card-footer span { overflow: hidden; color: #344159; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-card-pagination { margin-top: 16px; border: 1px solid #e5e9f1; border-radius: 12px; background: #fff; }
.agent-legacy-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid #e0e5ed; border-radius: 9px; background: #fff; box-shadow: 0 4px 14px rgba(39,51,81,.045); }
.agent-legacy-search > input, .agent-legacy-search > select { width: 135px; min-height: 34px; padding: 6px 9px; border-radius: 5px; font-size: 12px; background: #fff; }
.agent-legacy-search > input[name="search"] { width: 165px; }
.agent-legacy-search > select[name="sort"] { width: 125px; }
.agent-legacy-search > select[name="direction"] { width: 78px; }
.agent-legacy-search > select[name="per_page"] { width: 108px; }
.agent-search-date { display: flex; align-items: center; gap: 5px; min-height: 34px; padding: 3px 7px; border: 1px solid #dce2ed; border-radius: 5px; background: #fff; }
.agent-search-date span { color: #657188; font-size: 12px; font-weight: 750; white-space: nowrap; }
.agent-search-date input { width: 116px; padding: 3px 4px; border: 0; background: transparent; }
.agent-search-date i { color: #9aa3b1; font-size: 11px; font-style: normal; }
.agent-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; color: #637087; font-size: 12px; font-weight: 750; }
.agent-list-count { margin-left: auto; white-space: nowrap; }
.agent-quick-actions { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }
.agent-quick-action { min-height: 34px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 9px rgba(44,59,92,.1); }
.agent-quick-action:hover { filter: brightness(.97); transform: translateY(-1px); }
.agent-quick-action.deduction { border-color: #e79031; background: #ed9637; }
.agent-quick-action.deduction.soft { color: #b66516; background: #fff4e6; }
.agent-quick-action.payment { border-color: #496fe0; background: #5278e8; }
.agent-quick-action.payment.soft { color: #345cc9; background: #eef3ff; }
.agent-table-panel { overflow: hidden; border: 1px solid #dfe4ec; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(39,51,81,.055); }
.agent-table-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #e8ebf1; color: #33415b; font-size: 13px; font-weight: 850; background: #f8f9fc; }
.agent-table-caption small { color: #8a94a5; font-size: 11px; font-weight: 600; }
.agent-table-scroll { overflow-x: auto; scrollbar-color: #b8c1d0 #eef1f5; scrollbar-width: thin; }
.agent-table-scroll::-webkit-scrollbar { height: 10px; }
.agent-table-scroll::-webkit-scrollbar-track { background: #eef1f5; }
.agent-table-scroll::-webkit-scrollbar-thumb { border: 2px solid #eef1f5; border-radius: 999px; background: #b8c1d0; }
.agent-data-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #3f4b61; font-size: 12px; }
.agent-data-table th, .agent-data-table td { height: 45px; padding: 7px 10px; border-right: 1px solid #edf0f4; border-bottom: 1px solid #e8ebf0; text-align: center; white-space: nowrap; }
.agent-data-table th { height: 40px; color: #4c5970; font-size: 12px; font-weight: 850; background: #f3f5f8; }
.agent-data-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.agent-data-table tbody tr:hover td { background: #f3f7ff; }
.agent-data-table th:last-child, .agent-data-table td:last-child { border-right: 0; }
.agent-data-table .col-select { position: sticky; left: 0; z-index: 4; width: 42px; min-width: 42px; padding-right: 6px; padding-left: 6px; }
.agent-data-table .col-id { position: sticky; left: 0; z-index: 3; width: 58px; min-width: 58px; }
.agent-data-table.has-select .col-id { left: 42px; }
.agent-data-table .col-user { position: sticky; left: 58px; z-index: 3; width: 110px; min-width: 110px; text-align: left; }
.agent-data-table.has-select .col-user { left: 100px; }
.agent-data-table .col-actions { position: sticky; right: 0; z-index: 3; width: 188px; min-width: 188px; box-shadow: -5px 0 10px rgba(39,51,81,.05); }
.agent-data-table thead .col-select, .agent-data-table thead .col-id, .agent-data-table thead .col-user, .agent-data-table thead .col-actions { z-index: 6; background: #eef2f7; }
.agent-data-table tbody .col-select, .agent-data-table tbody .col-id, .agent-data-table tbody .col-user, .agent-data-table tbody .col-actions { background: #fff; }
.agent-data-table tbody tr:nth-child(even) .col-select, .agent-data-table tbody tr:nth-child(even) .col-id, .agent-data-table tbody tr:nth-child(even) .col-user, .agent-data-table tbody tr:nth-child(even) .col-actions { background: #fbfcfe; }
.agent-data-table tbody tr:hover .col-select, .agent-data-table tbody tr:hover .col-id, .agent-data-table tbody tr:hover .col-user, .agent-data-table tbody tr:hover .col-actions { background: #f3f7ff; }
.agent-child-filter-form { display: inline; }
.agent-user-link { padding: 0; border: 0; color: #365fcf; font: inherit; font-weight: 850; background: transparent; cursor: pointer; }
.agent-user-link:hover { text-decoration: underline; }
.agent-cell-note { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.agent-group-badge, .table-state { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.agent-group-badge { color: #315bbf; background: #eaf0ff; }
.table-state.on { color: #147650; background: #e8f7f0; }
.table-state.off { color: #8a5960; background: #f4ecee; }
.money-cell { color: #147650; font-weight: 850; }
.deduction-cell { color: #c35e2b; font-weight: 800; }
.table-metric { display: flex; align-items: baseline; justify-content: center; gap: 5px; }
.table-metric strong { color: #314d9c; font-size: 12px; }
.table-metric small { color: #8791a3; font-size: 11px; }
.visit-metric { display: flex; gap: 6px; }
.visit-metric span { padding: 2px 5px; border-radius: 4px; color: #526178; background: #f0f3f7; }
.agent-table-actions { display: flex; align-items: center; justify-content: center; gap: 5px; }
.agent-table-actions a, .agent-table-actions button { min-height: 27px; padding: 4px 8px; border: 1px solid #4968df; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 750; background: #4968df; cursor: pointer; }
.agent-table-actions .normal { border-color: #3b8ec9; color: #fff; background: #3b8ec9; }
.agent-table-actions button { border-color: #d8dee8; color: #526078; background: #fff; }
.agent-table-actions a:hover, .agent-table-actions button:hover { filter: brightness(.96); }
.switch-control.compact { transform: scale(.88); transform-origin: center; }
.agent-table-pagination { border-top: 1px solid #e5e9f0; background: #fbfcfe; }
.agent-dialog { width: min(720px,calc(100% - 28px)); max-height: 86vh; padding: 0; overflow: auto; border: 0; border-radius: 12px; color: #344159; background: #fff; box-shadow: 0 24px 70px rgba(24,34,55,.28); }
.agent-dialog::backdrop { background: rgba(28,37,55,.48); backdrop-filter: blur(2px); }
.agent-dialog-heading { display: flex; position: sticky; z-index: 2; top: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid #e6eaf0; background: #fff; }
.agent-dialog-heading strong, .agent-dialog-heading small { display: block; }
.agent-dialog-heading small { margin-top: 2px; color: #8892a3; }
.agent-dialog-heading button { width: 30px; height: 30px; border: 0; border-radius: 6px; color: #667287; font-size: 22px; background: #f0f2f6; cursor: pointer; }
.agent-dialog-body { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 16px; }
.agent-dialog-body section { padding: 14px; border: 1px solid #e4e8ef; border-radius: 9px; background: #fafbfd; }
.agent-dialog-body section.wide { grid-column: 1 / -1; }
.agent-dialog-body h3 { margin: 0 0 10px; color: #3b4962; font-size: 13px; }
.agent-dialog-body form { display: grid; gap: 8px; }
.agent-bulk-dialog { width: min(680px,calc(100% - 28px)); overflow: visible; }
.agent-bulk-dialog > form { display: block; }
.agent-bulk-dialog-content { display: grid; gap: 15px; padding: 17px 18px 0; }
.agent-bulk-notice { margin: 0; padding: 11px 13px; border: 1px solid #f0d39d; border-radius: 7px; color: #9a6118; font-size: 12px; line-height: 1.6; background: #fff8e9; }
.agent-bulk-field { display: grid; gap: 7px; color: #46536a; font-size: 13px; font-weight: 800; }
.agent-bulk-field > small { color: #8993a4; font-size: 11px; font-weight: 550; }
.agent-bulk-input-unit { display: flex; align-items: center; gap: 10px; }
.agent-bulk-input-unit input { width: 180px; min-height: 40px; }
.agent-bulk-input-unit em { color: #69758a; font-size: 12px; font-style: normal; font-weight: 650; }
.agent-bulk-dialog-actions { display: flex; align-items: center; gap: 9px; margin: 0; padding: 17px 18px 18px; }
.agent-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.agent-multi-dropdown { position: relative; font-weight: 600; }
.agent-multi-dropdown summary { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid #dce2ed; border-radius: 6px; color: #344159; background: #fff; cursor: pointer; list-style: none; }
.agent-multi-dropdown summary::-webkit-details-marker { display: none; }
.agent-multi-dropdown summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-multi-dropdown summary i { width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid #9aa4b4; border-bottom: 2px solid #9aa4b4; transform: rotate(45deg); transition: transform .18s ease; }
.agent-multi-dropdown[open] summary { border-color: #6680e8; box-shadow: 0 0 0 3px rgba(82,112,236,.11); }
.agent-multi-dropdown[open] summary i { margin-top: 4px; transform: rotate(225deg); }
.agent-multi-dropdown-panel { margin-top: 6px; padding: 7px; border: 1px solid #dce2ed; border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(31,43,64,.13); }
.agent-option-search { width: 100%; min-height: 36px; margin-bottom: 6px; padding: 7px 10px; border-radius: 5px; font-size: 12px; }
.agent-multi-options { max-height: 230px; overflow-y: auto; }
.agent-multi-options label { display: grid; grid-template-columns: 21px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 36px; padding: 6px 8px; border-radius: 5px; color: #3e4a60; cursor: pointer; }
.agent-multi-options label:hover { background: #f1f4ff; }
.agent-multi-options label[hidden] { display: none; }
.agent-multi-options input { width: 15px; height: 15px; accent-color: #5270ec; }
.agent-multi-options span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-multi-options small { color: #8c96a7; font-size: 10px; font-weight: 600; }
.agent-multi-options p { margin: 7px; color: #8c96a7; font-size: 12px; }
.agent-links-dialog { width: min(96vw,1220px); height: min(90vh,880px); max-width: none; max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #f5f5f5; box-shadow: 0 26px 80px rgba(18,28,48,.32); }
.agent-links-dialog::backdrop { background: rgba(22,29,43,.56); backdrop-filter: blur(2px); }
.agent-links-dialog-heading { display: flex; height: 48px; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; border-bottom: 1px solid #e4e7ec; color: #28354b; background: #fff; }
.agent-links-dialog-heading strong { font-size: 14px; }
.agent-links-dialog-heading button { width: 32px; height: 32px; border: 0; color: #536077; font-size: 25px; line-height: 1; background: transparent; }
.agent-links-dialog iframe { display: block; width: 100%; height: calc(100% - 48px); border: 0; background: #f5f5f5; }
.agent-links-embed-body { min-height: 100%; padding: 26px 34px 34px; background: #f5f5f5; }
.agent-links-notice { margin-bottom: 14px; }
.agent-links-content { display: grid; gap: 20px; }
.agent-links-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 14px 16px; border: 1px solid #9fd0ff; border-radius: 4px; color: #3b526d; font-size: 13px; background: #e8f4ff; }
.agent-links-summary strong { color: #075fbd; }
.agent-link-box { padding: 16px; border: 1px solid #e4e8ef; border-radius: 5px; background: #fff; }
.agent-link-box-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: #374359; font-size: 15px; }
.agent-link-box-heading i { color: #9099a8; font-style: normal; }
.agent-link-status { padding: 2px 6px; border-radius: 2px; color: #fff; font-size: 11px; font-weight: 800; background: #18bd68; }
.agent-link-list { display: grid; gap: 14px; }
.agent-link-list > .agent-link-row { display: block; padding: 11px 12px 10px; border: 0; border-left: 3px solid #168bff; border-radius: 4px; background: #fafafa; }
.agent-link-row label { display: block; margin-bottom: 8px; color: #0872e0; font-size: 13px; font-weight: 800; }
.agent-link-row input { width: 100%; height: 38px; padding: 8px 11px; border: 1px solid #cbd3df; border-radius: 3px; color: #536077; font-family: Consolas, monospace; font-size: 12px; background: #fff; }
.agent-link-row input::placeholder { color: #b3bac5; }
.agent-link-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.agent-link-actions form { margin: 0; }
.agent-link-button { min-height: 31px; padding: 5px 12px; border: 1px solid #1399f6; border-radius: 3px; color: #fff; font-size: 12px; font-weight: 750; background: #1399f6; }
.agent-link-button.key { border-color: #cfd5de; color: #465369; background: #fff; }
.agent-link-button.regenerate { border-color: #ffad08; background: #ffad08; }
.agent-link-button:disabled { cursor: not-allowed; opacity: .42; }
.agent-link-empty { padding: 40px 20px; border: 1px solid #e1e6ed; border-radius: 5px; color: #7b8596; text-align: center; background: #fff; }
.agent-regenerate-dialog { width: min(90vw,310px); padding: 0; overflow: hidden; border: 1px solid #d9dde4; border-radius: 2px; color: #4b5567; background: #fff; box-shadow: 0 14px 42px rgba(20,28,44,.26); }
.agent-regenerate-dialog::backdrop { background: rgba(32,40,52,.38); }
.agent-regenerate-heading { display: flex; height: 43px; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; border-bottom: 1px solid #e5e8ed; }
.agent-regenerate-heading strong { font-size: 14px; font-weight: 650; }
.agent-regenerate-heading button { width: 28px; height: 28px; padding: 0; border: 0; color: #3f4755; font-size: 24px; line-height: 1; background: transparent; }
.agent-regenerate-message { min-height: 68px; padding: 23px 20px 14px; font-size: 13px; }
.agent-regenerate-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 12px; }
.agent-regenerate-actions button { min-width: 56px; height: 30px; border-radius: 2px; font-size: 12px; }
.agent-regenerate-actions .confirm { border: 1px solid #1599ee; color: #fff; background: #1599ee; }
.agent-regenerate-actions .cancel { border: 1px solid #d4d8df; color: #4b5567; background: #fff; }
.customer-service-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; padding: 12px; border: 1px solid #e1e6ef; border-radius: 10px; background: #fff; }
.customer-service-filter input, .customer-service-filter select { min-height: 38px; padding: 7px 10px; border: 1px solid #dce2ed; border-radius: 7px; background: #fbfcfe; }
.customer-service-filter input { width: 240px; }
.customer-service-console { display: grid; grid-template-columns: minmax(280px, 34%) minmax(0, 1fr); min-height: 680px; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(39,51,81,.08); }
.customer-conversation-panel { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid #e5e9f0; background: #f8f9fc; }
.customer-conversation-heading { display: flex; min-height: 58px; padding: 0 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e4e8ef; background: #fff; }
.customer-conversation-heading strong { color: #27344c; font-size: 15px; }
.customer-conversation-heading span { color: #8791a3; font-size: 12px; }
.customer-conversation-list { flex: 1; min-height: 0; overflow-y: auto; }
.customer-conversation-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; padding: 13px 12px; align-items: center; border-bottom: 1px solid #e8ebf1; color: inherit; background: #fff; }
.customer-conversation-item:hover { background: #f3f6fc; }
.customer-conversation-item.active { position: relative; background: #edf2ff; }
.customer-conversation-item.active::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: #4968df; }
.customer-avatar { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 850; background: linear-gradient(135deg, #5d72e8, #894dd4); }
.customer-conversation-copy { min-width: 0; }
.customer-conversation-copy strong, .customer-conversation-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-conversation-copy strong { color: #28364f; font-size: 14px; }
.customer-conversation-copy small { margin-top: 5px; color: #7d8798; font-size: 12px; }
.customer-conversation-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.customer-conversation-meta time { color: #99a1af; font-size: 10px; }
.customer-conversation-meta b { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; font-size: 10px; background: #e75065; }
.customer-conversation-empty { padding: 50px 16px; color: #8a94a5; text-align: center; }
.customer-conversation-pagination { border-top: 1px solid #e3e7ee; background: #fff; }
.customer-chat-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #f2f4f8; }
.customer-chat-header { display: flex; min-height: 70px; padding: 10px 18px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e0e5ed; background: #fff; }
.customer-chat-header strong, .customer-chat-header small { display: block; }
.customer-chat-header strong { color: #26334b; font-size: 16px; }
.customer-chat-header small { margin-top: 5px; color: #8791a3; font-size: 11px; }
.customer-admin-messages { display: flex; flex: 1; min-height: 480px; padding: 20px; overflow-y: auto; flex-direction: column; gap: 12px; }
.customer-admin-message { display: flex; flex-direction: column; align-items: flex-start; }
.customer-admin-message.mine { align-items: flex-end; }
.customer-admin-message > div { max-width: 72%; padding: 10px 13px; border-radius: 13px 13px 13px 4px; color: #30394b; font-size: 14px; line-height: 1.55; background: #fff; box-shadow: 0 3px 12px rgba(39,51,81,.07); overflow-wrap: anywhere; white-space: pre-wrap; }
.customer-admin-message.mine > div { border-radius: 13px 13px 4px; color: #fff; background: linear-gradient(135deg, #4968df, #7055d8); }
.customer-admin-message time { margin-top: 4px; color: #99a1af; font-size: 10px; }
.customer-admin-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; border-top: 1px solid #dfe4ec; background: #fff; }
.customer-admin-reply textarea { min-height: 66px; max-height: 150px; padding: 10px 12px; resize: vertical; border: 1px solid #d9dfe8; border-radius: 9px; outline: none; background: #fafbfd; }
.customer-admin-reply textarea:focus { border-color: #5b73df; box-shadow: 0 0 0 3px rgba(73,104,223,.1); }
.customer-admin-reply .button { min-width: 100px; }
.customer-chat-empty { display: flex; flex: 1; min-height: 580px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #8b95a7; text-align: center; }
.customer-chat-empty strong { color: #536078; font-size: 17px; }

@media (max-width: 1050px) { .app-frame { grid-template-columns: 200px minmax(0,1fr); } .filter-panel, .agent-filter-panel { grid-template-columns: repeat(3,1fr); } .metric-grid { grid-template-columns: repeat(2,1fr); } .link-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1050px) { .order-table-summary { grid-template-columns: 1fr auto; } .order-summary-actions { grid-column: 1 / -1; grid-row: 2; justify-self: start; } }
@media (min-width: 1280px) { .order-filter-panel { flex-wrap: nowrap; } }
@media (max-width: 1250px) { .agent-card-list { grid-template-columns: minmax(0,760px); } }
@media (max-width: 1050px) { .legacy-setting-grid, .theme-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .app-frame { display: block; } .sidebar { position: static; width: 100%; height: auto; overflow-y: visible; } .sidebar-brand { padding-bottom: 14px; } .sidebar-nav { display: flex; overflow-x: auto; } .sidebar-nav a { white-space: nowrap; } .topbar { position: static; padding: 14px 18px; } .topbar-actions > span:not(.pill) { display: none; } .page-shell { width: min(100% - 24px,1500px); margin-top: 18px; } .page-heading, .hero-card, .toolbar, .theme-display-setting form { align-items: flex-start; flex-direction: column; } .balance-block { width: 100%; } .filter-panel, .filter-panel.short, .agent-filter-panel, .form-grid, .content-grid, .link-card-grid, .legacy-setting-grid, .theme-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } .filter-actions { align-items: center; } .video-search-toolbar label, .video-search-toolbar label:first-child { width: 100%; min-width: 0; } .legacy-table-toolbar .button { flex: 1 1 auto; } .agent-link-list > div { grid-template-columns: 1fr; } .agent-search-toolbar { align-items: stretch; } .agent-search-toolbar > input, .agent-search-toolbar > select, .agent-search-toolbar > input:first-child { width: 100%; } .agent-date-range { flex-wrap: wrap; } .agent-date-range input { flex: 1; width: auto; min-width: 120px; } .agent-more-filters > div { position: static; width: 100%; margin-top: 7px; box-shadow: none; } .agent-card-header { grid-template-columns: auto minmax(0,1fr); align-items: start; } .agent-card-header > .row-check { grid-column: 1; grid-row: 1 / span 4; } .agent-card-identity, .agent-card-hierarchy, .agent-card-status, .agent-card-actions { grid-column: 2; grid-row: auto; justify-content: flex-start; } .agent-kpi-grid, .agent-card-footer { grid-template-columns: 1fr 1fr; } .agent-action-list { right: auto; left: 0; } .pagination-shell { align-items: flex-start; flex-direction: column; } .pagination-controls { justify-content: flex-start; } }
@media (max-width: 760px) { .agent-form-list { padding: 16px; } .agent-form-row { grid-template-columns: 1fr; gap: 6px; padding: 9px 0; } .agent-form-row > label { padding-top: 0; text-align: left; } .agent-form-field-compact { width: 100%; } .agent-editor-actions { padding: 16px; } }
@media (max-width: 760px) { .personal-setting-row { grid-template-columns: 1fr; gap: 7px; } .personal-setting-row > label { text-align: left; } .personal-password-fields, .personal-cleanup-options { grid-template-columns: 1fr; } .personal-cleanup-warning { flex-direction: column; } }
@media (max-width: 760px) { .pay-setting-row { grid-template-columns: 1fr; } .pay-setting-row > label:first-child, .pay-setting-row-label { justify-content: flex-start; padding: 10px 14px 5px; border-right: 0; text-align: left; background: #fff; } .pay-setting-control { padding: 5px 14px 12px; } .pay-setting-control > input, .pay-setting-control > select { width: 100%; } .pay-setting-toggle-control > small { flex-basis: 100%; } }
@media (max-width: 760px) { .order-filter-panel { align-items: stretch; } .order-filter-panel label, .order-filter-panel .order-filter-select, .order-filter-panel .order-filter-wide, .order-filter-panel .order-filter-narrow, .order-filter-panel .order-filter-compact, .order-filter-panel .order-filter-ip { width: 100%; max-width: none; flex-basis: 100%; } }
@media (max-width: 760px) { .order-table-summary { grid-template-columns: 1fr; } .order-table-summary > strong, .order-summary-actions { grid-column: 1; grid-row: auto; justify-self: start; } .order-summary-actions { flex-wrap: wrap; justify-content: flex-start; } }
@media (max-width: 480px) { .login-panel { padding: 28px 22px; } .metric-grid { grid-template-columns: 1fr; } .page-heading h1 { font-size: 26px; } }
@media (max-width: 760px) { .agent-legacy-search { align-items: stretch; } .agent-legacy-search > input, .agent-legacy-search > select, .agent-legacy-search > input[name="search"], .agent-legacy-search > select[name="sort"], .agent-legacy-search > select[name="direction"], .agent-legacy-search > select[name="per_page"] { width: 100%; } .agent-search-date { flex-wrap: wrap; } .agent-search-date input { flex: 1; width: auto; min-width: 120px; } .agent-list-toolbar { align-items: stretch; flex-direction: column; } .agent-quick-actions { justify-content: flex-start; } .agent-list-count { margin-left: 0; } .agent-channel-grid { grid-template-columns: 1fr; } .agent-bulk-dialog { overflow: auto; } .agent-dialog-body { grid-template-columns: 1fr; } .agent-dialog-body section.wide { grid-column: auto; } }
@media (max-width: 760px) { .agent-links-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); } .agent-links-embed-body { padding: 14px; } .agent-links-summary { align-items: flex-start; flex-direction: column; } .agent-link-box { padding: 12px; } .agent-link-actions { justify-content: flex-start; gap: 8px; } }
@media (max-width: 900px) { .customer-service-console { grid-template-columns: 1fr; } .customer-conversation-panel { max-height: 330px; border-right: 0; border-bottom: 1px solid #e4e8ef; } .customer-admin-messages { min-height: 420px; } }
@media (max-width: 600px) { .customer-service-filter { align-items: stretch; flex-direction: column; } .customer-service-filter input, .customer-service-filter select { width: 100%; } .customer-chat-header { align-items: flex-start; flex-direction: column; } .customer-admin-reply { grid-template-columns: 1fr; } .customer-admin-message > div { max-width: 88%; } }

/* Mobile administration layout */
@media (max-width: 900px) {
    body.mobile-nav-open { overflow: hidden; }
    .app-frame { display: block; min-height: 100dvh; }
    .app-main { min-height: 100dvh; }
    .sidebar {
        position: fixed;
        z-index: 50;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        height: 100dvh;
        padding: 18px 14px 28px;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 18px 0 46px rgba(14, 23, 43, .28);
    }
    .mobile-nav-open .sidebar { transform: translateX(0); }
    .sidebar-brand { position: sticky; z-index: 2; top: -18px; margin: 0 -14px 8px; padding: 18px 22px 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: #17213a; }
    .sidebar-nav { display: grid; gap: 5px; overflow: visible; padding-bottom: 20px; }
    .sidebar-nav > .sidebar-dashboard { order: -2; }
    .sidebar-nav > .sidebar-promotion { order: -1; }
    .sidebar-nav a { min-height: 44px; padding: 12px 14px; white-space: normal; }
    .sidebar-group summary { min-height: 44px; padding: 12px 14px; }
    .sidebar-group > div { padding-left: 10px; }
    .sidebar-backdrop { display: block; position: fixed; z-index: 45; inset: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; background: rgba(13,22,40,.48); backdrop-filter: blur(2px); transition: opacity .2s ease; }
    .mobile-nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
    .topbar { position: sticky; z-index: 35; top: 0; min-height: 62px; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.97); }
    .topbar-leading { flex: 1 1 auto; gap: 10px; overflow: hidden; }
    .topbar-title .eyebrow { display: none; }
    .topbar-title strong { max-width: 48vw; font-size: 15px; }
    .topbar-tools { gap: 0; margin-left: 0; }
    .topbar-tool { width: 34px; height: 40px; padding: 8px; }
    .topbar-title { flex: 0 1 auto; }
    .mobile-nav-toggle { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 0; border: 1px solid #dfe5ef; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(39,51,81,.06); }
    .mobile-nav-toggle span { display: block; width: 19px; height: 2px; border-radius: 99px; background: #33415b; transition: transform .2s ease, opacity .2s ease; }
    .mobile-nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
    .mobile-nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .topbar-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; }
    .topbar-actions > span:not(.pill) { display: none; }
    .topbar-actions .pill { max-width: 31vw; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-actions .ghost-button { min-height: 40px; padding: 8px 11px; border-radius: 10px; font-size: 12px; white-space: nowrap; }

    .page-shell { width: auto; margin: 14px 12px 38px; }
    .page-shell > .notice { margin-bottom: 12px; }
    .notice, .alert { padding: 11px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
    .page-heading { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 14px; }
    .page-heading h1 { font-size: clamp(23px, 7vw, 29px); line-height: 1.25; }
    .page-heading .muted { margin-top: 7px; font-size: 13px; }
    .page-heading > form, .page-heading > .button { width: 100%; }
    .page-heading > form > .button, .page-heading > .button { width: 100%; }
    .eyebrow { margin-bottom: 5px; font-size: 10px; }

    .hero-card { align-items: stretch; flex-direction: column; gap: 16px; padding: 20px; border-radius: 16px; }
    .hero-card h1 { font-size: 25px; }
    .hero-card .muted { margin-bottom: 0; font-size: 13px; }
    .balance-block { width: 100%; min-width: 0; padding: 14px; border-radius: 13px; }
    .balance-block strong { font-size: 23px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
    .metric-card { min-width: 0; padding: 16px 14px; border-radius: 14px; }
    .metric-card strong { overflow: hidden; margin: 9px 0 5px; font-size: clamp(18px, 5vw, 23px); text-overflow: ellipsis; white-space: nowrap; }
    .metric-card span, .metric-card small { font-size: 11px; }
    .content-grid, .link-card-grid, .legacy-setting-grid, .theme-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
    .panel, .form-panel { padding: 16px; border-radius: 14px; }
    .panel.slim { padding: 12px; }
    .panel-heading { align-items: flex-start; gap: 10px; margin-bottom: 13px; }
    .panel h2 { font-size: 18px; }
    .stat-list div { gap: 10px; padding: 12px 0; font-size: 13px; }

    .filter-panel, .filter-panel.short, .agent-filter-panel, .form-grid { grid-template-columns: 1fr; gap: 11px; }
    .filter-panel { margin-bottom: 14px; padding: 14px; border-radius: 14px; }
    .filter-panel label, .form-grid label { gap: 5px; }
    .filter-actions, .form-actions { width: 100%; align-items: stretch; flex-wrap: wrap; }
    .filter-actions > .button, .filter-actions > button, .filter-actions > a, .form-actions > .button, .form-actions > button, .form-actions > a { flex: 1 1 120px; }
    input, select, textarea { min-height: 44px; font-size: 16px; }
    select[multiple] { min-height: 118px; }
    .button, .ghost-button { min-height: 43px; }
    .button.small { min-height: 38px; }
    .button-row { width: 100%; align-items: stretch; }
    .button-row > .button, .button-row > button, .button-row > a { flex: 1 1 132px; }
    .toolbar { align-items: stretch; flex-direction: column; gap: 10px; margin-bottom: 12px; }
    .toolbar > form, .toolbar > .button, .toolbar > a { width: 100%; }
    .toolbar > form > .button, .toolbar > .button, .toolbar > a.button { width: 100%; }
    .inline-form { flex-wrap: wrap; }
    .inline-form input, .inline-form select { width: auto; min-height: 38px; font-size: 14px; }

    .table-panel, .agent-table-panel { width: 100%; min-width: 0; border-radius: 13px; }
    .table-summary, .order-table-summary { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 13px; }
    .table-summary strong, .order-table-summary > strong { justify-self: auto; font-size: 12px; }
    .order-summary-actions { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
    .order-summary-actions .button { flex: 0 0 auto; }
    .table-scroll, .agent-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #aeb9cb #edf1f6; -webkit-overflow-scrolling: touch; }
    .table-scroll::-webkit-scrollbar, .agent-table-scroll::-webkit-scrollbar { height: 9px; }
    .table-scroll::-webkit-scrollbar-track, .agent-table-scroll::-webkit-scrollbar-track { background: #edf1f6; }
    .table-scroll::-webkit-scrollbar-thumb, .agent-table-scroll::-webkit-scrollbar-thumb { border: 2px solid #edf1f6; border-radius: 999px; background: #aeb9cb; }
    .table-scroll table { width: max-content; min-width: 100%; }
    th, td { padding: 10px 11px; font-size: 12px; }
    th { font-size: 11px; }
    .actions { gap: 8px; }
    .empty { min-width: min(76vw, 300px); padding: 28px 18px; white-space: normal; }
    .pagination { padding: 11px 12px; }
    .pagination-shell { align-items: stretch; flex-direction: column; gap: 10px; }
    .pagination-summary { white-space: normal; }
    .pagination-controls { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
    .pagination-button { min-width: 38px; min-height: 38px; flex: 0 0 auto; }

    .form-panel { padding: 16px; }
    .form-grid .full { grid-column: auto; }
    .form-actions { margin-top: 18px; }
    .sticky-actions { position: sticky; bottom: 8px; padding: 10px; border-radius: 12px; }
    .rule-tree label { align-items: flex-start; min-height: 44px; padding: 8px 0; }
    .rule-tree code { margin-left: 0; overflow-wrap: anywhere; white-space: normal; }

    .promotion-tabs { gap: 5px; margin: 0 -12px; padding: 6px 12px 12px; }
    .promotion-tabs a { padding: 9px 11px; font-size: 13px; }
    .promotion-card { min-height: 360px; margin-top: 12px; padding: 18px 14px; }
    .promotion-card-actions { position: static; width: 100%; margin-bottom: 8px; }
    .promotion-card-actions .button { width: 100%; }
    .promotion-qr, .promotion-qr canvas, .promotion-qr img { width: min(68vw, 240px) !important; height: min(68vw, 240px) !important; }
    .promotion-url { max-width: 100%; font-size: 12px; }
    .promotion-buttons { width: 100%; }
    .theme-display-setting form { align-items: stretch; flex-direction: column; }
    .theme-display-setting fieldset { flex-wrap: wrap; }
    .theme-preview { min-height: 330px; }

    .video-search-toolbar { align-items: stretch; flex-direction: column; padding: 13px; }
    .video-search-toolbar label, .video-search-toolbar label:first-child { width: 100%; min-width: 0; }
    .legacy-table-toolbar { padding: 10px 12px; }
    .legacy-table-toolbar .button { flex: 1 1 125px; min-height: 38px; }
    .video-player-dialog video { width: calc(100% - 24px); max-height: 70dvh; margin: 12px; }

    .admin-dialog, .agent-dialog, .agent-bulk-dialog, .agent-links-dialog, .video-player-dialog { width: calc(100vw - 20px); max-width: none; max-height: calc(100dvh - 20px); margin: auto; border-radius: 13px; }
    .admin-dialog > form, .admin-dialog > .form-grid, .admin-dialog > .form-actions { margin-right: 14px; margin-left: 14px; }
    .dialog-heading, .agent-dialog-heading { padding: 13px 14px; }
    .dialog-heading h2 { font-size: 17px; }
    .agent-dialog-body { grid-template-columns: 1fr; padding: 12px; }
    .agent-dialog-body section.wide { grid-column: auto; }
    .agent-bulk-dialog { overflow: auto; }
    .agent-bulk-dialog-content { padding: 14px 14px 0; }
    .agent-bulk-dialog-actions { padding: 14px; }
    .agent-bulk-input-unit { align-items: stretch; flex-direction: column; gap: 6px; }
    .agent-bulk-input-unit input { width: 100%; }
    .agent-links-dialog { height: calc(100dvh - 20px); }
    .agent-links-embed-body { padding: 12px; }
    .agent-links-summary { align-items: flex-start; flex-direction: column; }
    .agent-link-box { padding: 12px; }
    .agent-link-actions { justify-content: flex-start; gap: 7px; }
    .agent-link-button { min-height: 38px; }

    .agent-legacy-search { align-items: stretch; flex-direction: column; padding: 12px; }
    .agent-legacy-search > input, .agent-legacy-search > select, .agent-legacy-search > input[name="search"], .agent-legacy-search > select[name="sort"], .agent-legacy-search > select[name="direction"], .agent-legacy-search > select[name="per_page"] { width: 100%; min-height: 43px; font-size: 16px; }
    .agent-list-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
    .agent-list-toolbar .button-row { justify-content: stretch; }
    .agent-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .agent-quick-action { min-height: 42px; padding: 7px 8px; }
    .agent-list-count { margin-left: 0; }
    .agent-table-caption { align-items: flex-start; flex-direction: column; gap: 3px; }
    .agent-data-table .col-actions { position: static; box-shadow: none; }
    .agent-data-table thead .col-actions { background: #eef2f7; }
    .agent-data-table tbody .col-actions { background: #fff; }
    .agent-data-table tbody tr:nth-child(even) .col-actions { background: #fbfcfe; }
    .agent-table-actions a, .agent-table-actions button { min-height: 34px; padding: 6px 9px; }
    .agent-channel-grid { grid-template-columns: 1fr; }
    .agent-action-list { right: auto; left: 0; max-width: calc(100vw - 48px); }
    .agent-editor-form { width: 100%; }
    .agent-form-list { padding: 14px; }
    .agent-form-row { grid-template-columns: 1fr; gap: 6px; min-height: 0; padding: 9px 0; }
    .agent-form-row > label { padding-top: 0; text-align: left; }
    .agent-form-field-compact, .agent-input-unit input { width: 100%; }
    .agent-input-unit { align-items: stretch; flex-direction: column; gap: 6px; }
    .agent-editor-actions { padding: 14px; }

    .pay-setting-row { grid-template-columns: 1fr; }
    .pay-setting-row > label:first-child, .pay-setting-row-label { justify-content: flex-start; padding: 10px 14px 5px; border-right: 0; text-align: left; background: #fff; }
    .pay-setting-control { align-items: stretch; flex-direction: column; padding: 5px 14px 12px; }
    .pay-setting-control > input, .pay-setting-control > select { width: 100%; }
    .pay-setting-toggle-control { align-items: flex-start; flex-direction: row; }
    .pay-setting-toggle-control > small { flex-basis: 100%; }
    .pay-setting-actions { padding: 14px; }

    .personal-settings-panel .panel-heading, .personal-data-cleanup .panel-heading { padding: 14px; }
    .personal-settings-form { padding: 2px 14px 6px; }
    .personal-setting-row { grid-template-columns: 1fr; gap: 6px; padding: 11px 0; }
    .personal-setting-row > label { text-align: left; }
    .personal-password-fields, .personal-cleanup-options { grid-template-columns: 1fr; }
    .personal-settings-actions { padding: 14px; }
    .personal-cleanup-warning { margin: 14px; flex-direction: column; }
    .personal-cleanup-options { padding: 0 14px 14px; }

    .customer-service-console { grid-template-columns: 1fr; min-height: 0; }
    .customer-conversation-panel { max-height: 320px; border-right: 0; border-bottom: 1px solid #e4e8ef; }
    .customer-admin-messages { min-height: 390px; padding: 14px; }
    .customer-admin-message > div { max-width: 88%; }
}

@media (max-width: 520px) {
    .page-shell { margin: 10px 9px 32px; }
    .topbar { padding: 8px 9px; }
    .topbar-title strong { max-width: 42vw; }
    .topbar-actions .ghost-button { padding-inline: 9px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card strong { font-size: 22px; }
    .panel, .form-panel { padding: 14px; }
    .filter-panel { padding: 12px; }
    .filter-actions > .button, .filter-actions > button, .filter-actions > a, .form-actions > .button, .form-actions > button, .form-actions > a { flex-basis: 100%; }
    .button-row > .button, .button-row > button, .button-row > a { flex-basis: 100%; }
    .agent-quick-actions { grid-template-columns: 1fr; }
    .agent-data-table .col-select, .agent-data-table .col-id, .agent-data-table .col-user { position: static; }
    .agent-data-table .col-user { text-align: center; }
    .agent-card-header, .agent-kpi-grid, .agent-card-footer { grid-template-columns: 1fr; }
    .agent-card-header > .row-check, .agent-card-identity, .agent-card-hierarchy, .agent-card-status, .agent-card-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
    .promotion-tabs { margin-right: -9px; margin-left: -9px; padding-right: 9px; padding-left: 9px; }
    .customer-service-filter { align-items: stretch; flex-direction: column; }
    .customer-service-filter input, .customer-service-filter select { width: 100%; }
    .customer-chat-header { align-items: flex-start; flex-direction: column; }
    .customer-admin-reply { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .sidebar-backdrop, .mobile-nav-toggle span { transition: none; }
}

@media (max-width: 900px) {
    .agent-dashboard-home { display: flex; flex-direction: column; gap: 14px; }
    .order-metrics { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 8px; }
    .order-metrics .metric-card { min-width: 0; padding: 14px 10px; border-radius: 12px; }
    .order-metrics .metric-card span { font-size: 11px; }
    .order-metrics .metric-card strong { margin: 9px 0 5px; font-size: clamp(18px,5vw,23px); }
    .order-metrics .metric-card small { display: block; font-size: 11px; overflow-wrap: anywhere; }
    .promotion-price-grid { grid-template-columns: minmax(0,1fr); gap: 14px; margin-top: 0; }
    .promotion-price-grid .legacy-setting-item { min-width: 0; margin: 0; padding: 14px 12px; font-size: 14px; }
    .promotion-price-grid .legacy-setting-item legend { padding: 0 5px; font-size: 15px; }
    .promotion-price-grid .legacy-setting-item label { gap: 5px; font-size: 14px; }
    .promotion-price-grid .promotion-price-switches { gap: 10px; }
    .promotion-price-grid input[type="radio"] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #5065ef; }
    .promotion-price-grid .legacy-setting-item input:not([type="radio"]) { width: 100%; min-width: 0; min-height: 40px; padding: 7px 5px; font-size: 16px; }
    .promotion-price-grid .legacy-setting-item small { font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
    .page-shell > .agent-legacy-search,
    .page-shell > .order-filter-panel,
    .page-shell > .withdrawal-filter-panel,
    .page-shell > .withdrawal-metrics { display: none; }
    .dashboard-home .dashboard-visits-panel { display: none; }
    .dashboard-home > .hero-card { display: none; }
    .agent-dashboard-home > .metric-grid,
    .agent-dashboard-home > .content-grid { display: contents; }
    .agent-dashboard-home > .hero-card { order: 0; }
    .agent-dashboard-home .hero-card .balance-block { display: none; }
    .agent-dashboard-home .metric-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 12px; min-height: 138px; padding: 20px 16px; order: 1; border-color: var(--metric-border); background: linear-gradient(115deg,var(--metric-tint),#fff 72%); box-shadow: 0 5px 18px rgba(39,51,81,.045); }
    .agent-dashboard-home .metric-card.accent-blue { --metric-tint: #edf4ff; --metric-border: #d8e5fb; --metric-ink: #2458ba; --metric-soft: #e3edff; }
    .agent-dashboard-home .metric-card.accent-violet { --metric-tint: #f4efff; --metric-border: #e6ddf8; --metric-ink: #7141b5; --metric-soft: #eee5fb; }
    .agent-dashboard-home .metric-card.accent-green { --metric-tint: #edf9f3; --metric-border: #d2ecdf; --metric-ink: #14764f; --metric-soft: #ddf3e7; }
    .agent-dashboard-home .metric-card > div { min-width: 0; }
    .agent-dashboard-home .metric-card > div > span { color: #536079; font-size: 12px; font-weight: 600; }
    .agent-dashboard-home .metric-card > div > strong { color: var(--metric-ink); font-size: clamp(20px,5.6vw,27px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
    .agent-dashboard-home .metric-card > div > small { display: inline-block; margin-top: 3px; padding: 4px 8px; border-radius: 6px; color: var(--metric-ink); background: var(--metric-soft); font-size: 11px; line-height: 1.4; }
    .agent-dashboard-home .dashboard-mobile-companion { display: flex; min-height: 88px; flex-direction: column; justify-content: center; padding: 10px 6px; border: 1px solid var(--metric-border); border-radius: 12px; background: var(--metric-tint); text-align: center; }
    .agent-dashboard-home .dashboard-mobile-companion > span { color: var(--metric-ink); font-size: 12px; font-weight: 600; }
    .agent-dashboard-home .dashboard-mobile-companion > strong { overflow: visible; margin: 8px 0 0; font-size: clamp(17px,4.8vw,23px); line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
    .agent-dashboard-home .accent-green .dashboard-mobile-companion { border-color: #f1d6a4; background: #fff6e5; }
    .agent-dashboard-home .accent-green .dashboard-mobile-companion > span,
    .agent-dashboard-home .accent-green .dashboard-mobile-companion > strong { color: #945709; }
    .agent-dashboard-home .dashboard-total-card { display: none; }
    .agent-dashboard-home .content-grid > .panel { order: 3; }
    .agent-dashboard-home .content-grid > .dashboard-announcement-panel { position: relative; overflow: hidden; order: 2; border-left: 4px solid #ee8738; }
    .agent-dashboard-home .dashboard-announcement-panel .eyebrow,
    .agent-dashboard-home .dashboard-announcement-count { display: none; }
    .agent-dashboard-home .dashboard-announcement-panel .panel-heading { margin-bottom: 12px; }
    .agent-dashboard-home .dashboard-announcement-item strong,
    .agent-dashboard-home .dashboard-announcement-item p { white-space: normal; overflow-wrap: anywhere; }
    .agent-dashboard-home .dashboard-announcement-empty { min-height: 60px; }
}
.copy-success-toast { position: fixed; z-index: 2147483647; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px; box-sizing: border-box; min-width: 180px; max-width: calc(100vw - 32px); padding: 18px 20px; border: 1px solid #d6d6d6; border-radius: 2px; background: #fff; color: #666; box-shadow: 0 2px 6px rgba(0,0,0,.08); font-size: 14px; line-height: 28px; pointer-events: none; }
.copy-success-toast-icon { position: relative; display: block; flex: 0 0 30px; width: 30px; height: 30px; box-sizing: border-box; border: 2px solid #00bfa5; border-radius: 50%; }
.copy-success-toast-icon::after { content: ''; position: absolute; left: 7px; top: 5px; width: 12px; height: 7px; border-left: 2px solid #00bfa5; border-bottom: 2px solid #00bfa5; transform: rotate(-45deg); }
.domain-bound-agents { width: 220px; max-width: 60vw; }
.domain-bound-agents summary { cursor: pointer; color: #4f6bed; font-size: 13px; white-space: nowrap; }
.domain-bound-agents-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; max-height: 140px; overflow-y: auto; overflow-wrap: anywhere; white-space: normal; }
.domain-bound-agents[open] .domain-bound-agents-list { margin-top: 8px; }
.domain-bound-agents-list.compact { width: 220px; max-width: 60vw; }
.domain-agent-field { display: grid; gap: 8px; min-width: 0; }
.domain-agent-dropdown .agent-multi-dropdown-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; }
.domain-agent-tools { display: flex; gap: 14px; padding: 5px 7px 10px; }
.domain-agent-tools button { padding: 0; border: 0; color: #778092; background: transparent; font-size: 12px; }
.domain-agent-tools button:hover { color: #4968df; }
.domain-agent-options { max-height: 230px; overflow-y: auto; }
.domain-agent-options label { display: flex; align-items: center; gap: 9px; padding: 8px 7px; font-size: 13px; font-weight: 400; cursor: pointer; }
.domain-agent-options label[hidden] { display: none; }
.domain-agent-options label:hover { background: #f4f6fb; }
.domain-agent-options input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: #5270ec; }
.video-sort-field { display: grid; gap: 7px; width: 150px; min-width: 0; color: #46536a; font-size: 12px; font-weight: 750; }
.video-sort-dropdown .agent-multi-dropdown-panel { position: absolute; top: 100%; left: 0; z-index: 25; width: 220px; max-width: calc(100vw - 40px); }
.video-list-panel:has(.video-sort-dropdown[open]) { overflow: visible; }
.video-sort-options { max-height: 220px; overflow-y: auto; }
.video-sort-options label { display: flex; align-items: center; gap: 8px; width: auto; min-width: 0; padding: 8px 5px; cursor: pointer; }
.video-sort-options label[hidden] { display: none; }
.video-sort-options input[type="checkbox"] { width: 16px; min-width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #5270ec; }
.video-sort-dropdown [data-sort-clear] { margin-top: 8px; padding: 3px 5px; border: 0; background: transparent; }
@media (max-width: 760px) { .video-sort-field { width: 100%; } }
.super-order-statistics { padding: 16px 20px 20px; margin-bottom: 20px; }
.super-order-statistics h2 { display: inline-block; margin: 0 0 18px; padding: 0 8px 12px; border-bottom: 2px solid #329cff; font-size: 14px; font-weight: 650; }
.super-order-statistics-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 30px 0; }
.super-order-statistic { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 6px 16px; border-right: 1px solid #edf0f5; }
.super-order-statistic:nth-child(6n) { border-right: 0; }
.super-order-statistic-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px; border: 4px solid #e3f9df; border-radius: 50%; background: #7ed17b; color: #fff; font-size: 26px; font-weight: 600; }
.super-order-statistic-icon svg { width: 25px; height: 25px; }
.super-order-statistic.amount .super-order-statistic-icon { border-color: #ffe3e8; background: #ff7891; }
.super-order-statistic > div { min-width: 0; }
.super-order-statistic strong { display: block; color: #182238; font-size: clamp(20px,1.7vw,28px); font-weight: 500; overflow-wrap: anywhere; line-height: 1.4; }
.super-order-statistic > div > span { display: block; margin-top: 3px; color: #6c778b; font-size: 12px; }
@media (max-width: 1200px) { .super-order-statistics-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 0; } .super-order-statistic:nth-child(3n) { border-right: 0; } }
@media (max-width: 600px) { .super-order-statistics { padding: 12px; } .super-order-statistics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 0; } .super-order-statistic { gap: 8px; padding: 4px 8px; border-right: 0; } .super-order-statistic-icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 21px; } .super-order-statistic strong { font-size: 20px; } .super-order-statistic > div > span { font-size: 11px; } }
@media (min-width: 901px) {
    .sidebar-nav > * { order: 50; }
    .sidebar-nav > [data-nav-label="数据概览"] { order: 0; }
    .sidebar-nav > [data-nav-label="系统设置"] { order: 1; }
    .sidebar-nav > [data-nav-label="权限管理"] { order: 2; }
    .sidebar-nav > [data-nav-label="推广管理"] { order: 3; }
    .sidebar-nav > [data-nav-label="域名管理"] { order: 4; }
    .sidebar-nav > [data-nav-label="代理管理"] { order: 5; }
    .sidebar-nav > [data-nav-label="资源管理"] { order: 6; }
    .sidebar-nav > [data-nav-label="订单管理"] { order: 7; }
    .sidebar-nav > [data-nav-label="余额明细"] { order: 8; }
    .sidebar-nav > [data-nav-label="提现管理"] { order: 9; }
    .sidebar-nav > [data-nav-label="代理公告"] { order: 10; }
    .sidebar-nav > [data-nav-label="数据备份"] { order: 11; }
}
.agent-parent-options { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; max-height: 240px; margin-top: 5px; padding: 5px; overflow-y: auto; border: 1px solid #dce2ed; border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(31,43,64,.13); }
.agent-parent-options[hidden], .agent-parent-options button[hidden] { display: none; }
.agent-parent-options button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 4px; text-align: left; color: #344159; background: #fff; font-size: 13px; }
.agent-parent-options button:hover, .agent-parent-options button:focus { outline: none; color: #3658cc; background: #eef2ff; }
.agent-parent-options p { margin: 8px 12px; color: #8a93a4; font-size: 13px; }
