:root { font-family: "Segoe UI", "Microsoft JhengHei", sans-serif; color: #263548; background: #f5f7fa; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f5f7fa; }
a { color: #288fd7; text-decoration: none; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; padding: 9px 15px; background: #409eff; color: #fff; cursor: pointer; font-weight: 600; white-space: nowrap; }
button.secondary, .button.secondary { color: #409eff; background: #ecf5ff; border: 1px solid #b3d8ff; }
button.danger, .button.danger { background: #f56c6c; }
button.warning, .button.warning { background: #e96b6b; }
button.amber, .button.amber { background: #e6a23c; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { width: 100%; border: 1px solid #dcdfe6; border-radius: 4px; padding: 9px 11px; background: #fff; color: #303133; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.1); }
input[type=checkbox] { width: auto; }
label { display: block; color: #606266; font-size: .9rem; margin: 0 0 7px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; padding: 22px 14px 16px; background: #fff; border-right: 1px solid #e6e9ef; display: flex; flex-direction: column; z-index: 10; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; color: #17243a; font-size: 1.05rem; font-weight: 750; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; background: linear-gradient(135deg,#409eff,#1274bd); font-size: .76rem; letter-spacing: -.03em; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 5px; color: #4d596b; font-size: .94rem; }
.side-nav a span { width: 18px; text-align: center; color: #7c8797; }
.side-nav a:hover { color: #409eff; background: #f4f9ff; }
.side-nav a.active { color: #409eff; background: #ecf5ff; font-weight: 650; }
.side-nav a.active span { color: #409eff; }
.nav-label { margin: 15px 12px 5px; color: #a4aab4; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.sidebar-account { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid #eef0f4; display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.sidebar-account span, .sidebar-account strong { display: block; }
.sidebar-account span { color: #9aa1ac; font-size: .72rem; }
.sidebar-account strong { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.logout-button { padding: 6px 9px; color: #707987; background: transparent; border: 1px solid #dcdfe6; }
.main-content { margin-left: 220px; padding: 30px 36px 55px; min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0 0 5px; color: #202b3c; font-size: 1.65rem; font-weight: 650; }
.page-heading p { margin: 0; color: #8a94a3; }
.toolbar, .batch-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar select { width: 170px; }
.toolbar input { width: min(320px, 40vw); }
.renewal-filters { flex-wrap: wrap; }
.renewal-filters input { width: min(220px, 32vw); }
.add-toolbar { padding: 18px; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; }
.add-toolbar input { max-width: 320px; }
.table-shell { width: 100%; overflow-x: auto; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid #ebeef5; vertical-align: middle; white-space: nowrap; font-size: .88rem; }
th { color: #7e8795; background: #fafbfc; font-weight: 600; }
tbody tr:hover { background: #fafcff; }
.line-table { min-width: 1260px; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.row-actions button, .row-actions .button { padding: 6px 9px; font-size: .78rem; }
.suggestion-actions { min-width: 420px; flex-wrap: wrap; align-items: stretch; }
.suggestion-actions form { display: flex; gap: 5px; }
.suggestion-actions select { width: auto; min-width: 120px; padding: 6px 8px; font-size: .78rem; }
.schedule-days { flex-wrap: wrap; }
.schedule-days label { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.history-filter { max-width: none; }
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 14px; }
.comparison-grid { margin: 18px 0; }
.comparison-card > div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; margin-top: 12px; }
.comparison-card small { min-width: 58px; text-align: right; }
.trend-up { color: #d95050; }.trend-down { color: #2f9c66; }
.compact-metric { font-size: 1.05rem !important; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 6px; color: #8a94a3; }
.analytics-columns { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; align-items: start; }
.analytics-columns .section-title { margin-top: 24px; }
.analytics-columns th,.analytics-columns td { padding: 9px; }
.activity-timeline { padding-left: 22px; border-left: 2px solid #d9ecff; }
.activity-timeline > div { position: relative; display: grid; grid-template-columns: 115px 48px 140px 1fr; gap: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; border: 1px solid #ebeef5; border-radius: 5px; }
.activity-timeline > div::before { content: ""; position: absolute; left: -29px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: #409eff; }
.activity-timeline small { grid-column: 4; color: #8a94a3; }
.protocol-badge { display: inline-flex; justify-content: center; padding: 2px 6px; border-radius: 3px; color: #287bb5; background: #ecf5ff; font-size: .75rem; }
.history-table { min-width: 1150px; }
.unclassified-panel { margin-top: 22px; }
.unclassified-panel summary { cursor: pointer; color: #606266; font-weight: 600; margin-bottom: 10px; }
.status-pill { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: .78rem; border: 1px solid; }
.status-正常 { color: #2f9c66; background: #edf9f3; border-color: #b7e5ce; }
.status-到期 { color: #d48806; background: #fff8e6; border-color: #f4d58a; }
.status-停用 { color: #d95050; background: #fff1f0; border-color: #f4b8b5; }
.masked { color: #a1a8b2; letter-spacing: .08em; }
.empty { padding: 35px; text-align: center; color: #9aa1ac; }
.form-card { max-width: 960px; padding: 24px; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; }
.compact-form { max-width: none; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 22px; margin-bottom: 22px; }
.compact-form .form-grid { grid-template-columns: repeat(4,minmax(150px,1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.line-category-picker input[type=search] { margin-bottom: 8px; }
.line-category-picker select { margin-bottom: 6px; }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; }
.inline-edit { display: flex; gap: 6px; min-width: 230px; }
.inline-edit input { min-width: 135px; }
.inline-edit button { padding: 7px 9px; }
.mode-toggle { padding: 12px; border-radius: 5px; background: #fff8e6; border: 1px solid #f4d58a; }
.mode-toggle label { margin: 0; color: #8a5a00; }
.game-global-allow-list { margin-bottom: 22px; }
.game-global-allow-list .compact-heading { margin-bottom: 14px; }
.game-global-allow-list .compact-form { padding: 0; border: 0; }
.observation-actions { min-width: 260px; flex-wrap: wrap; }
.section-title { margin: 28px 0 12px; color: #263548; font-size: 1.15rem; }
.alert { padding: 12px 15px; margin: 0 0 16px; border-radius: 5px; border: 1px solid #f3d19e; color: #b46b12; background: #fdf6ec; }
.alert.success, .success { color: #27855a; border-color: #b7e5ce; background: #f0f9f4; }
.alert.danger { color: #d95050; border-color: #f4b8b5; background: #fff1f0; }
.validation-summary-errors { color: #d95050; margin-bottom: 14px; }
.one-time-credentials { margin-bottom: 18px; border-color: #9bd5b8; }
.line-account-preview { padding: 14px; border: 1px solid #d9ecff; border-radius: 5px; background: #f5faff; }
.line-account-preview-list { display: grid; gap: 7px; margin-bottom: 8px; }
.line-account-preview-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.line-account-preview-item span { color: #667386; }
code { padding: 3px 6px; border-radius: 3px; color: #a23b5f; background: #fff1f4; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 16px; }
.card { padding: 22px; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; box-shadow: 0 5px 18px rgba(36,50,66,.04); }
.highlight-row { background: #fff8dc; }
.copy-toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; box-shadow: 0 8px 24px rgba(36,50,66,.18); }
.node-card { margin-bottom: 20px; }
.node-card details { margin-top: 18px; }
.node-card summary { cursor: pointer; font-weight: 600; }
.update-changelog { margin-top: 18px; }
.update-changelog pre { max-height: 320px; overflow: auto; white-space: pre-wrap; color: #4d596b; }
.update-danger-zone { margin-top: 18px; border-color: #f3d19e; }
.update-danger-zone form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.metric strong { display: block; margin-top: 8px; font-size: 1.8rem; color: #273448; }
.actions { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.actions form { margin: 0; }
.muted { color: #929baa; }
.status-on { color: #2f9c66; }.status-off { color: #d95050; }
.guest-header { height: 66px; display: flex; align-items: center; padding: 0 4vw; background: #fff; border-bottom: 1px solid #e8ebf0; }
.guest-header .sidebar-brand { padding: 0; }
.guest-content { width: min(560px,92vw); margin: 42px auto; }
.guest-content .narrow { width: 100%; }
@media (max-width:700px) { .sidebar { width: 74px; padding-inline: 9px; }.sidebar-brand span:last-child,.side-nav a { font-size: 0; }.side-nav a span { font-size: 1rem; }.nav-label,.sidebar-account { display:none; }.main-content { margin-left:74px; padding:24px 18px; }.compact-form .form-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:1100px) { .analytics-columns { grid-template-columns: 1fr; }.activity-timeline > div { grid-template-columns: 105px 45px 1fr; }.activity-timeline small { grid-column: 3; } }
@media (max-width:620px) { .form-grid,.compact-form .form-grid { grid-template-columns:1fr; }.page-heading { align-items:flex-start; }.toolbar,.batch-actions { flex-wrap:wrap; }.toolbar input,.toolbar select { width:100%; } }
