:root {
    color-scheme: light;
    --navy-950: #0b1f33;
    --navy-900: #102a43;
    --navy-800: #183b56;
    --teal-700: #0f766e;
    --teal-600: #13877d;
    --teal-100: #dff7f3;
    --blue-100: #e8f1ff;
    --blue-700: #2f68b1;
    --amber-100: #fff3d5;
    --amber-700: #a85d00;
    --red-100: #fee9e7;
    --red-700: #b42318;
    --green-100: #e3f7ec;
    --green-700: #16734b;
    --bg: #f3f6f8;
    --panel: #ffffff;
    --line: #dce5ea;
    --line-soft: #eaf0f3;
    --text: #243b53;
    --muted: #6b7c8a;
    --shadow: 0 8px 24px rgba(16, 42, 67, .055);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; color: var(--text); background: var(--bg); }
body { font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid #cbd8df; border-radius: 8px; outline: none; color: var(--text); background: #fbfcfd; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
input:disabled, button:disabled { opacity: .52; cursor: not-allowed; }
textarea { resize: vertical; }
label { display: grid; gap: 7px; margin-bottom: 16px; color: #425b70; font-size: 13px; font-weight: 650; }
label > span { display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; color: #eaf4f7; background: linear-gradient(180deg, var(--navy-950), #0d2941 72%, #0a2135); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 25px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; color: white; font-weight: 800; background: linear-gradient(135deg, #1aa397, var(--teal-700)); box-shadow: 0 8px 18px rgba(5, 95, 86, .3); }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .015em; }
.brand small { margin-top: 3px; color: #90aabc; font-size: 11px; }
.nav-menu { display: grid; gap: 4px; }
.nav-section { margin: 17px 12px 5px; color: #68889e; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-section:first-child { margin-top: 0; }
.nav-link { display: flex; align-items: center; padding: 10px 13px; border-radius: 8px; color: #bdd0dc; transition: color .15s, background .15s; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.08); }
.nav-link.active { box-shadow: inset 3px 0 var(--teal-600); }
.sidebar-footer { margin-top: auto; padding: 13px 9px 0; border-top: 1px solid rgba(255,255,255,.1); color: #7795a8; font-size: 11px; }
.demo-dot, .environment-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #35c39f; box-shadow: 0 0 0 3px rgba(53,195,159,.12); }

main { min-width: 0; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.topbar-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.demo-badge { padding: 4px 7px; border: 1px solid #f0d39d; border-radius: 5px; color: #8f5706; background: #fff7e6; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: white; background: var(--navy-800); font-size: 10px; font-weight: 800; }
.account-link { color: var(--muted); font-weight: 700; }
.account-link:hover { color: var(--teal-700); }
.logout-link { color: var(--muted); font-weight: 700; }
.logout-link:hover { color: var(--red-700); }
.page-content { max-width: 1480px; margin: auto; padding: 30px 32px 45px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 3px 0 7px; color: var(--navy-900); font-size: 29px; line-height: 1.2; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow, .section-kicker { color: var(--teal-700) !important; font-size: 10px !important; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.section-kicker { margin: 0 0 4px !important; }
.last-sync { color: var(--muted); font-size: 12px; }

.panel, .stat-card, .action-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.panel { padding: 21px; }
.panel h2 { margin: 0; color: var(--navy-900); font-size: 17px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-title > span { color: var(--muted); font-size: 12px; }
.panel-title h2 { margin: 0; }
.text-link { color: var(--teal-700); font-size: 12px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 13px 15px; border: 1px solid #bfe5de; border-radius: 9px; color: #135d56; background: var(--teal-100); font-size: 13px; }
.notice strong { flex: 0 0 auto; }
.warning-notice { border-color: #ead7ad; color: #785014; background: #fff8e8; }
.info-box { margin: 4px 0 17px; padding: 13px 14px; border-radius: 8px; color: #32546e; background: #edf5fa; }
.info-box p { margin: 5px 0 0; color: #648096; font-size: 12px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
.stats-grid.four { grid-template-columns: repeat(4, 1fr); }
.stat-card { position: relative; overflow: hidden; padding: 19px; }
.stat-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: #8ba2b2; }
.stat-card.accent-teal::before { background: var(--teal-600); }
.stat-card.accent-blue::before { background: #4f82c4; }
.stat-card.accent-amber::before { background: #d79122; }
.stat-card.accent-slate::before { background: #637b8b; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; margin: 8px 0 4px; color: var(--navy-900); font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card small { font-size: 11px; }
.compact-stats .stat-card { padding: 16px 18px; }
.compact-stats .stat-card strong { font-size: 25px; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: start; }
.span-two { grid-column: span 2; }
.span-three { grid-column: span 3; }
.server-table { display: grid; }
.server-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) 90px 80px minmax(150px, .8fr); gap: 15px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.server-row:first-child { border-top: 0; }
.server-row > div:first-child strong, .server-row > div:first-child small { display: block; }
.server-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.number-cell strong, .number-cell small { display: block; text-align: right; }
.load-cell > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.load-cell > div:first-child strong { color: var(--text); }
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: #e9eff2; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--teal-600); }
.progress i.danger { background: #d24d3f; }
.progress.labeled { margin-top: 11px; }
.compact-list article, .simple-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.compact-list article:first-child, .simple-list article:first-child { border-top: 0; }
.compact-list strong, .compact-list p, .simple-list strong, .simple-list small { display: block; }
.compact-list p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.compact-list time, .simple-list time { color: var(--muted); font-size: 11px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-grid a { padding: 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fbfcfd; transition: border-color .15s, transform .15s; }
.quick-grid a:hover { border-color: #98ccc6; transform: translateY(-1px); }
.quick-grid span, .quick-grid strong, .quick-grid small { display: block; }
.quick-index { margin-bottom: 12px; color: var(--teal-700); font-size: 10px; font-weight: 800; }
.quick-grid strong { color: var(--navy-900); }
.quick-grid small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.timeline article { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 10px; padding-bottom: 15px; }
.timeline article::before { position: absolute; left: 5px; top: 8px; bottom: 0; width: 1px; content: ""; background: var(--line); }
.timeline article:last-child::before { display: none; }
.timeline i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; border: 3px solid white; border-radius: 50%; background: var(--teal-600); box-shadow: 0 0 0 1px #9acdc7; }
.timeline strong { color: var(--navy-900); }
.timeline p { margin: 3px 0; color: var(--muted); font-size: 11px; }
.timeline time { color: #93a3ae; font-size: 10px; }

.status-pill { display: inline-flex; align-items: center; width: max-content; padding: 4px 8px; border-radius: 999px; color: #526a79; background: #edf2f4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pill.success { color: var(--green-700); background: var(--green-100); }
.status-pill.warning { color: var(--amber-700); background: var(--amber-100); }
.status-pill.danger { color: var(--red-700); background: var(--red-100); }
.status-pill.info { color: var(--blue-700); background: var(--blue-100); }
.subtle-tag { margin-left: 6px; padding: 3px 7px; border-radius: 4px; color: #60798a; background: #eef3f5; font-size: 10px; }

.primary-button, .secondary-button, .danger-button, .danger-outline-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 15px; border-radius: 8px; cursor: pointer; font-weight: 700; transition: background .15s, border-color .15s; }
.primary-button { border: 1px solid var(--teal-700); color: white; background: var(--teal-700); }
.primary-button:hover { background: #0b655e; }
.secondary-button { border: 1px solid #c9d6dc; color: #425b70; background: white; }
.secondary-button:hover:not(:disabled) { border-color: #93aab7; background: #f7fafb; }
.danger-button { border: 1px solid var(--red-700); color: white; background: var(--red-700); }
.danger-outline-button { border: 1px solid #e2ada8; color: var(--red-700); background: white; }
.compact { min-height: 31px; padding: 5px 10px; font-size: 11px; }
.text-danger-button { padding: 4px 0; border: 0; color: var(--red-700); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.button-row { display: flex; gap: 8px; }
.modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(11, 31, 51, .52); backdrop-filter: blur(2px); }
.modal-card { width: min(720px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 28px 70px rgba(11, 31, 51, .24); }
.modal-card h2 { margin: 0; color: var(--navy-900); font-size: 20px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.modal-close-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #c9d6dc; border-radius: 8px; color: var(--muted); background: white; cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close-button:hover { border-color: #93aab7; color: var(--navy-900); background: #f7fafb; }
.modal-actions { justify-content: flex-end; margin-top: 20px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.checkbox-label input { width: auto; }
.form-message { margin: 10px 0; color: var(--teal-700); font-size: 12px; font-weight: 650; }
.role-id-result { max-height: 150px; overflow-y: auto; overflow-wrap: anywhere; line-height: 1.7; }
.helper-text { margin: 0; color: var(--muted); font-size: 11px; }
.danger-text { color: var(--red-700) !important; }

.two-column { display: grid; grid-template-columns: minmax(350px, .82fr) minmax(480px, 1.18fr); gap: 18px; align-items: start; }
.sticky-form { position: sticky; top: 20px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-fields { grid-template-columns: 1fr 1fr; }
.form-grid.three-fields { grid-template-columns: .65fr 1.2fr 1.2fr; }
.form-grid.four-fields { grid-template-columns: repeat(4, 1fr); }
.audience-rule-builder { margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.audience-rule-builder legend { padding: 0 5px; color: #425b70; font-size: 12px; font-weight: 700; }
.audience-rule-empty { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.mail-sender-time-grid { align-items: start; }
.mail-scope-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 11px 13px; border: 1px solid #cee0e4; border-radius: 8px; color: #426276; background: #f3f8f8; font-size: 11px; }
.mail-scope-hint strong { color: var(--teal-700); }
.audience-rule-builder .mail-scope-hint { margin-bottom: 0; }
.mail-award-list, .reward-item-list { display: grid; gap: 8px; margin: 11px 0; }
.mail-award-row, .reward-item-row { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(120px, .6fr) auto; gap: 8px; align-items: end; }
.mail-award-row label, .reward-item-row label { margin: 0; }
.mail-award-row .text-danger-button, .reward-item-row .text-danger-button { min-height: 38px; }
.item-picker { position: relative; }
.item-picker-options { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; left: 0; max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid #c9d9df; border-radius: 8px; background: white; box-shadow: 0 14px 32px rgba(11, 31, 51, .18); }
.item-picker-options-virtualized { height: 280px; }
.item-picker-options button { display: block; width: 100%; min-height: 48px; padding: 7px 10px; border: 0; border-radius: 6px; text-align: left; background: transparent; cursor: pointer; }
.item-picker-options button:hover, .item-picker-options button:focus { background: #eff8f7; outline: none; }
.item-picker-options strong, .item-picker-options small { display: block; }
.item-picker-options strong { overflow: hidden; color: var(--navy-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.item-picker-options small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.item-picker-empty { display: block; padding: 10px; color: var(--muted); font-size: 11px; text-align: center; }
.modal-card.cdkey-code-modal { width: min(820px, 100%); }
.cdkey-code-toolbar, .cdkey-code-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cdkey-code-toolbar { margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.cdkey-code-list { display: grid; gap: 6px; max-height: min(58vh, 560px); overflow-y: auto; padding-right: 4px; }
.cdkey-code-row { display: grid; grid-template-columns: 62px minmax(240px, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 7px; background: #f9fbfc; }
.cdkey-code-row > span { color: var(--muted); font-size: 10px; text-align: right; }
.cdkey-code-row code { color: var(--navy-900); font-size: 13px; font-weight: 750; letter-spacing: .08em; }
.cdkey-code-pagination { justify-content: flex-end; margin-top: 14px; }
.record-list, .campaign-list { display: grid; gap: 11px; }
.record-card, .campaign-card { padding: 16px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fcfdfd; }
.record-card-head, .campaign-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.record-card-head time { color: var(--muted); font-size: 10px; }
.record-card h3, .campaign-card h3 { margin: 12px 0 6px; color: var(--navy-900); font-size: 15px; }
.record-card > p, .campaign-card p { margin: 0; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 13px; color: #6b8190; font-size: 11px; }
.record-meta.stacked { display: grid; gap: 6px; }
.record-meta.stacked b { display: inline-block; width: 42px; color: #425b70; }
.preview-box, .mail-preview { margin: 4px 0 16px; padding: 17px; border: 1px solid #d7e4e9; border-radius: 10px; background: linear-gradient(145deg, #f9fbfc, #f0f6f7); }
.preview-box > span { color: var(--teal-700); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.preview-box strong { display: block; margin-top: 14px; color: var(--navy-900); font-size: 17px; }
.preview-box p, .mail-preview p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.mail-preview-head { display: flex; justify-content: space-between; color: var(--teal-700); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.mail-preview-head small { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.mail-preview h3 { margin: 15px 0 0; color: var(--navy-900); }
.attachment-preview { margin-top: 14px; padding: 8px 10px; border-radius: 6px; color: #416276; background: white; font-size: 11px; }
.announcement-pages-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.announcement-pages-head h3 { margin: 2px 0 0; color: var(--navy-900); font-size: 14px; }
.announcement-page-editor { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fbfdfd; }
.announcement-page-editor > label:last-child { margin-bottom: 0; }
.announcement-preview img { display: block; width: 100%; max-height: 260px; margin-top: 12px; border-radius: 8px; object-fit: contain; background: #e9eff2; }
.announcement-preview a { display: inline-block; margin-top: 10px; color: var(--teal-700); font-size: 12px; font-weight: 700; }
.announcement-history-actions { align-items: center; margin-top: 13px; }

.campaign-head h3 { margin-top: 0; }
.campaign-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.campaign-stats span, .campaign-stats strong { display: block; }
.campaign-stats span { color: var(--muted); font-size: 10px; }
.campaign-stats strong { margin-top: 4px; color: var(--navy-900); font-size: 12px; }
.code-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.code-preview .code-token, .change-code { padding: 4px 7px; border: 1px solid #d8e3e8; border-radius: 5px; color: #385a70; background: white; font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; }
.code-preview > span { align-self: center; color: var(--muted); font-size: 10px; }

.search-panel { margin-bottom: 16px; }
.search-row { display: grid; grid-template-columns: minmax(300px, 1fr) auto auto; gap: 9px; align-items: end; }
.search-row label { margin: 0; }
.player-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.player-results { display: grid; gap: 7px; }
.player-result { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 11px; border: 1px solid transparent; border-radius: 9px; text-align: left; background: #f8fafb; cursor: pointer; }
.player-result:hover, .player-result.selected { border-color: #a7d2cd; background: #f0faf8; }
.player-avatar, .large-avatar { display: grid; place-items: center; border-radius: 10px; color: white; font-weight: 800; background: linear-gradient(145deg, var(--navy-800), #2d607c); }
.player-avatar { width: 38px; height: 38px; }
.player-result strong, .player-result small { display: block; }
.player-result small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.player-main { display: grid; gap: 16px; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.profile-identity { display: flex; align-items: center; gap: 14px; }
.large-avatar { width: 52px; height: 52px; font-size: 18px; }
.title-line { display: flex; align-items: center; gap: 9px; }
.title-line h2, .approval-card h3 { margin: 0; }
.profile-identity p { margin: 5px 0 0; color: var(--muted); }
.profile-facts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.profile-facts span, .profile-facts strong, .profile-facts small { display: block; }
.profile-facts span { color: var(--muted); font-size: 10px; }
.profile-facts strong { margin-top: 5px; color: var(--navy-900); font-size: 12px; }
.profile-facts small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.risk-panel { border-color: #ecc5c1; background: #fffdfd; }
.confirm-check { display: flex; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 500; }
.confirm-check input { width: auto; }
.tab-bar { display: flex; gap: 4px; margin: -7px -2px 14px; border-bottom: 1px solid var(--line); }
.tab-bar button { padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; }
.tab-bar button.active { border-bottom-color: var(--teal-700); color: var(--teal-700); font-weight: 700; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 11px; }

.server-section { margin-bottom: 16px; }
.server-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.server-card { padding: 15px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fcfdfd; }
.server-card.has-alert { border-color: #edc6c2; background: #fffcfc; }
.server-card-head { display: flex; justify-content: space-between; gap: 9px; }
.server-card-head strong, .server-card-head small { display: block; }
.server-card-head small, .updated-at { margin-top: 4px; color: var(--muted); font-size: 9px; }
.server-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 15px 0 10px; }
.server-numbers span, .server-numbers strong { display: block; }
.server-numbers span { color: var(--muted); font-size: 9px; }
.server-numbers strong { margin-top: 3px; color: var(--navy-900); font-size: 14px; }
.updated-at { display: block; margin-top: 8px; }
.operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.inline-form { display: grid; grid-template-columns: 95px 1.1fr 1fr auto; gap: 7px; margin-bottom: 10px; }
.inline-form > * { margin: 0; }
.blocked-form { grid-template-columns: 1fr 120px auto; }
.social-form { grid-template-columns: .8fr 1.2fr 95px auto; }
.simple-list > article > div { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; align-items: center; }
.simple-list > article > div small { grid-column: 2; color: var(--muted); }
.simple-list .status-pill { grid-row: 1 / span 2; }
.social-icon { display: grid !important; grid-row: 1 / span 2; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--teal-700); background: var(--teal-100); font-weight: 800; }
.toggle { position: relative; width: 38px; height: 21px; padding: 0; border: 0; border-radius: 99px; background: #cad5da; cursor: pointer; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; transition: left .15s; }
.toggle.on { background: var(--teal-600); }
.toggle.on i { left: 20px; }

.governance-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: start; }
.user-management-grid { display: grid; grid-template-columns: .85fr 1.15fr 1fr; gap: 16px; align-items: start; }
.cell-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.inline-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.text-link-button { padding: 4px 0; border: 0; color: var(--teal-700); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.permission-role-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.permission-role-grid article { padding: 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fbfcfd; }
.role-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.role-card-head strong { color: var(--navy-900); }
.role-card-head code { color: var(--muted); font-size: 9px; }
.permission-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.permission-tags span { padding: 3px 6px; border-radius: 5px; color: #486779; background: #edf3f5; font-size: 9px; }
.error-message { color: var(--red-700); }
.integration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.configuration-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.configuration-list > div { padding: 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fafcfd; }
.configuration-list span, .configuration-list strong { display: block; }
.configuration-list span { color: var(--muted); font-size: 10px; }
.configuration-list strong { margin-top: 5px; color: var(--navy-900); font-size: 12px; word-break: break-all; }
.connection-result { margin-top: 13px; padding: 13px; border-radius: 8px; background: var(--green-100); color: var(--green-700); }
.connection-result.failed { background: var(--red-100); color: var(--red-700); }
.connection-result p { margin: 5px 0; }
.connection-result small { opacity: .75; font-size: 9px; word-break: break-all; }
.endpoint-list { display: grid; gap: 8px; }
.endpoint-list article { display: grid; grid-template-columns: 48px 1fr auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; }
.endpoint-list code { color: #385a70; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.endpoint-list small { color: var(--muted); font-size: 10px; }
.method { display: inline-flex; justify-content: center; padding: 3px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.method.get { color: var(--blue-700); background: var(--blue-100); }
.method.post { color: var(--amber-700); background: var(--amber-100); }
.compact-empty { padding: 20px; }
.approval-list { display: grid; gap: 10px; }
.approval-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: #fcfdfd; }
.approval-card-main { display: flex; gap: 12px; min-width: 0; }
.approval-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--teal-700); background: var(--teal-100); font-weight: 800; }
.approval-card-main strong { display: block; margin-top: 7px; color: #425b70; font-size: 12px; }
.approval-card-main p { margin: 4px 0; color: var(--muted); font-size: 11px; }
.approval-card-main small, .approval-card > time { color: #91a0a9; font-size: 9px; }
.approval-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.role-list { display: grid; }
.role-list article { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.role-list article:first-child { border-top: 0; }
.role-list article > span { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: var(--teal-700); background: var(--teal-100); font-size: 11px; font-weight: 800; }
.role-list strong { color: var(--navy-900); font-size: 12px; }
.role-list p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.filter-panel { margin-bottom: 16px; }
.filter-grid { display: grid; grid-template-columns: 1.5fr .8fr .7fr auto; gap: 10px; align-items: end; }
.filter-grid label { margin: 0; }
.filter-actions { display: flex; gap: 7px; }
.table-wrap { overflow-x: auto; }
.log-query-filter-grid { display: grid; gap: 10px; align-items: end; }
.log-query-filter-grid.recharge { grid-template-columns: 1fr 1.2fr 1.2fr .8fr 1.1fr auto; }
.log-query-filter-grid.chat { grid-template-columns: 1fr 1.15fr 1.15fr .75fr .75fr 1fr auto; }
.log-query-filter-grid label { margin: 0; }
.log-query-actions { display: flex; gap: 7px; }
.log-query-hint { margin-top: 12px; }
.log-query-stats.two { grid-template-columns: repeat(2, 1fr); }
.log-query-results { margin-top: 16px; }
.log-query-table { min-width: 1080px; }
.log-query-table.chat-table { min-width: 1050px; }
.log-query-table .mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.log-query-table .nowrap { white-space: nowrap; }
.log-query-table .number-column { text-align: right; }
.log-query-table .amount-column { color: var(--teal-700); font-weight: 750; }
.log-query-table .chat-content { min-width: 280px; max-width: 520px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.log-query-subvalue { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.log-json { position: relative; }
.log-json summary { color: var(--teal-700); cursor: pointer; font-size: 11px; font-weight: 700; }
.log-json pre { position: absolute; z-index: 50; right: 0; width: min(620px, 78vw); max-height: 380px; overflow: auto; margin: 7px 0 0; padding: 13px; border: 1px solid #c9d9df; border-radius: 8px; color: #d9e7ed; background: #10293a; box-shadow: 0 16px 36px rgba(11,31,51,.25); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-query-pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #fafcfd; font-size: 10px; font-weight: 750; letter-spacing: .03em; }
td { font-size: 12px; }
tbody tr:hover { background: #fbfdfd; }
.audit-table table { min-width: 1180px; }
.audit-summary-row td { vertical-align: top; }
.audit-summary-row .nowrap strong, .audit-summary-row .nowrap small { display: block; }
.audit-summary-row .nowrap strong { color: var(--navy-900); font-size: 11px; }
.audit-summary-row .nowrap small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.audit-operator { color: var(--navy-900); }
.audit-target { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; white-space: nowrap; }
.audit-description { display: -webkit-box; max-width: 240px; overflow: hidden; color: #41596d; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.audit-detail-action { white-space: nowrap; }
.audit-toggle { display: inline-flex; align-items: center; gap: 6px; }
.audit-toggle span { min-width: 18px; padding: 2px 5px; border-radius: 999px; color: var(--teal-700); background: var(--teal-100); font-size: 9px; }
.audit-no-detail { color: var(--muted); }
.audit-detail-row td { padding: 0 10px 13px 10px; background: #fbfdfd; }
.audit-detail-row:hover { background: transparent; }
.audit-detail-panel { margin: 0 0 2px; padding: 14px; border: 1px solid #dce8ec; border-radius: 8px; background: linear-gradient(180deg, #ffffff, #f7fbfb); }
.audit-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.audit-detail-head strong { color: var(--navy-900); font-size: 13px; }
.audit-detail-head span { color: var(--muted); font-size: 10px; }
.operation-detail-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.operation-detail-list div { min-width: 0; padding: 9px 10px; border: 1px solid #e1eaee; border-radius: 7px; background: #fbfdfd; }
.operation-detail-list dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.operation-detail-list dd { margin: 0; color: #183349; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.empty-state { padding: 34px; border: 1px dashed #c9d5db; border-radius: 10px; text-align: center; color: var(--muted); background: #fafcfd; }
.blazor-error-boundary { padding: 16px; color: white; background: var(--red-700); }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 15% 15%, rgba(24, 120, 111, .13), transparent 32%), linear-gradient(135deg, #eff5f6, #f8fafb); }
.auth-shell { width: min(920px, 100%); display: grid; grid-template-columns: .95fr 1.05fr; overflow: hidden; border: 1px solid #d9e3e8; border-radius: 18px; background: white; box-shadow: 0 28px 70px rgba(11, 31, 51, .14); }
.auth-shell.single-card { width: min(480px, 100%); grid-template-columns: 1fr; }
.auth-brand-panel { position: relative; padding: 48px; color: white; background: linear-gradient(150deg, var(--navy-950), #123b56); }
.auth-brand-panel::after { position: absolute; right: -70px; bottom: -90px; width: 230px; height: 230px; border: 45px solid rgba(30, 185, 169, .12); border-radius: 50%; content: ""; }
.auth-brand-panel .eyebrow { margin-top: 28px; color: #66d2c8 !important; }
.auth-brand-panel h1 { margin: 8px 0 12px; font-size: 31px; }
.auth-brand-panel > p:not(.eyebrow) { color: #b7ccd8; line-height: 1.7; }
.auth-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--teal-600); font-size: 19px; font-weight: 900; }
.auth-security-note { position: relative; z-index: 1; display: grid; gap: 4px; margin-top: 80px; padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.05); }
.auth-security-note span { color: #abc1ce; font-size: 11px; line-height: 1.55; }
.auth-form-panel { padding: 48px; }
.auth-form-panel > div:first-child { margin-bottom: 27px; }
.auth-form-panel h2 { margin: 5px 0 7px; color: var(--navy-900); font-size: 24px; }
.auth-form-panel p { color: var(--muted); }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-error { margin: 4px 0 12px; color: var(--red-700); font-size: 12px; }
.auth-error ul { margin: 0; padding-left: 17px; }
.auth-footer { display: block; margin-top: 18px; text-align: center; color: #91a0aa; }
.password-hint { margin: -6px 0 14px; font-size: 11px; }

@media (max-width: 1180px) {
    .stats-grid.four, .server-cards { grid-template-columns: repeat(2, 1fr); }
    .profile-facts { grid-template-columns: repeat(3, 1fr); }
    .form-grid.four-fields { grid-template-columns: repeat(2, 1fr); }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .nav-menu { grid-template-columns: repeat(2, 1fr); }
    .nav-section { grid-column: span 2; }
    .sidebar-footer { display: none; }
    .stats-grid, .stats-grid.four, .log-query-stats.two, .two-column, .dashboard-grid, .operations-grid, .governance-grid, .user-management-grid, .integration-grid, .player-layout { grid-template-columns: 1fr; }
    .span-two, .span-three { grid-column: span 1; }
    .sticky-form { position: static; }
    .server-cards { grid-template-columns: repeat(2, 1fr); }
    .form-grid.three-fields, .form-grid.four-fields { grid-template-columns: 1fr 1fr; }
    .page-content { padding: 23px; }
}

@media (max-width: 600px) {
    .topbar { padding: 0 18px; }
    .topbar-meta > span:not(.avatar) { display: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid.four, .server-cards, .quick-grid, .form-grid.two-fields, .form-grid.three-fields, .form-grid.four-fields, .campaign-stats, .search-row, .filter-grid, .log-query-filter-grid.recharge, .log-query-filter-grid.chat, .inline-form, .social-form, .mail-award-row, .reward-item-row { grid-template-columns: 1fr; }
    .log-query-actions { flex-wrap: wrap; }
    .cdkey-code-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; }
    .cdkey-code-row code { font-size: 11px; letter-spacing: .03em; }
    .server-row { grid-template-columns: 1fr auto; }
    .server-row .number-cell, .server-row .load-cell { grid-column: span 2; }
    .number-cell strong, .number-cell small { text-align: left; }
    .profile-heading { align-items: flex-start; flex-direction: column; }
    .profile-facts { grid-template-columns: 1fr 1fr; }
    .approval-card { align-items: flex-start; flex-direction: column; }
    .permission-role-grid { grid-template-columns: 1fr; }
    .auth-body { padding: 15px; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { padding: 30px; }
    .modal-backdrop { align-items: end; padding: 12px; }
    .modal-card { max-height: calc(100vh - 24px); padding: 20px; border-radius: 12px; }
}
