:root { --bg: #f5f7fb; --surface: #fff; --ink: #172033; --muted: #7d879b; --line: #e7ebf2; --navy: #1c2740; --blue: #526dff; --blue-soft: #edf0ff; --green: #22aa7b; --green-soft: #e7f7f1; --orange: #eea148; --shadow: 0 18px 50px rgba(36, 54, 92, .08); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 238px; background: var(--navy); color: #cad2e3; padding: 28px 18px 22px; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 44px; color: #fff; }.brand-mark { width: 35px; height: 35px; border-radius: 11px; background: linear-gradient(135deg,#8494ff,#536bff); display: grid; place-items: center; font-size: 22px; font-weight: 800; box-shadow: 0 8px 18px rgba(83,107,255,.32); }.brand strong { display: block; font-size: 18px; letter-spacing: -.04em; }.brand span { display: block; font-size: 10px; color: #98a6c4; letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }
.side-nav { display: grid; gap: 7px; }.side-nav a { color: #aab6cf; text-decoration: none; border-radius: 10px; padding: 12px 13px; font-size: 13px; display: flex; align-items: center; gap: 12px; }.side-nav a span { width: 18px; text-align: center; color: #8391b2; font-size: 17px; }.side-nav a.active, .side-nav a:hover { background: rgba(126,145,255,.14); color: #fff; }.side-nav a.active span { color: #9caaff; }
.sidebar-foot { margin-top: auto; padding: 15px 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; color: #aeb9d0; }.sidebar-foot small { display: block; color: #6e7e9f; margin-top: 9px; }.pulse, .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 8px; background: #6d7890; }.pulse { background: #47d9a6; box-shadow: 0 0 0 4px rgba(71,217,166,.12); }
.main-content { flex: 1; max-width: 1520px; min-width: 0; margin: 0 auto; padding: 46px clamp(24px, 4vw, 64px) 30px; }.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 35px; }.eyebrow { color: #94a0b5; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .15em; }.topbar h1 { margin: 8px 0 7px; font-size: clamp(27px, 3vw, 37px); letter-spacing: -.055em; }.topbar p { margin: 0; font-size: 13px; color: var(--muted); }.top-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }.last-sync { color: #a0a9b9; font-size: 11px; margin-right: 4px; }
.btn { border: 0; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 700; transition: .2s ease; }.btn:hover { transform: translateY(-1px); }.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 8px 17px rgba(82,109,255,.22); }.btn.ghost { background: #fff; border: 1px solid var(--line); color: #68748b; }.btn.ghost:hover { border-color: #bbc5f4; color: var(--blue); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 40px; }.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 20px; display: flex; align-items: center; gap: 14px; min-height: 116px; box-shadow: 0 5px 18px rgba(36,54,92,.025); }.metric-card.accent { background: linear-gradient(135deg,#536dff,#687eff); color: #fff; border: 0; box-shadow: 0 15px 28px rgba(82,109,255,.2); }.metric-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; font-size: 18px; color: #536dff; background: var(--blue-soft); }.metric-card.accent .metric-icon { color: #fff; background: rgba(255,255,255,.17); }.metric-icon.telegram { color: #3199d4; background: #eaf7ff; }.metric-icon.qq { color: #e7626c; background: #fff0f1; font-weight: 800; }.metric-icon.notice { color: var(--orange); background: #fff5e9; }.metric-card span { display: block; font-size: 11px; color: var(--muted); }.metric-card.accent span { color: rgba(255,255,255,.74); }.metric-card strong { display: block; margin: 5px 0 2px; font-size: 22px; letter-spacing: -.04em; }.metric-card small { color: #abb3c1; font-size: 10px; }.metric-card.accent small { color: rgba(255,255,255,.72); }
.section-block { margin-bottom: 39px; }.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 17px; }.section-heading h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.04em; }.section-note { font-size: 11px; color: #a1aaba; }.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(410px, 1fr)); gap: 16px; }.account-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 21px 21px 15px; box-shadow: var(--shadow); overflow: hidden; }.account-card.current { border-color: #cfd5ff; }.account-card.current:before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg,#536dff,#9aabff); }.account-card-head { display: flex; justify-content: space-between; align-items: start; }.account-title { display: flex; align-items: center; gap: 11px; }.pair-avatar { width: 35px; height: 35px; border-radius: 11px; color: #536dff; background: var(--blue-soft); display: grid; place-items: center; font-size: 15px; font-weight: 800; }.account-title h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: -.025em; }.pair-id { color: #a5aec0; font: 10px "DM Mono", monospace; }.tag { font-size: 10px; border-radius: 30px; padding: 5px 9px; }.tag.green { color: #15956a; background: var(--green-soft); }.tag.blue { color: #536dff; background: var(--blue-soft); }.tag.gray { color: #8691a3; background: #f1f3f7; }
.connection-line { display: flex; align-items: center; gap: 14px; margin: 25px 0 21px; }.connection-node { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }.connection-node > span { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }.tg-node > span { color: #2d97d0; background: #eaf7ff; }.qq-node > span { color: #e76872; background: #fff0f1; }.connection-node small, .account-meta span { color: #a4adbd; font-size: 9px; letter-spacing: .07em; display: block; }.connection-node strong { display: block; font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.connection-node em { color: #abb3c1; font-size: 9px; font-style: normal; display: block; margin-top: 2px; }.connector { display: flex; gap: 3px; align-items: center; }.connector i { display: block; width: 12px; height: 1px; background: #ccd3e2; }.account-meta { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 12px; border-top: 1px solid #f0f2f6; padding-top: 15px; }.account-meta strong { display: block; font-size: 10px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.status { display: block; font-size: 10px; margin-top: 5px; color: #737e93; }.status-dot.online { background: #2fb789; box-shadow: 0 0 0 3px rgba(47,183,137,.12); }.account-note { margin-top: 13px; color: #8b96aa; font-size: 10px; }.account-card-actions { margin-top: 13px; padding-top: 11px; border-top: 1px solid #f0f2f6; display: flex; justify-content: flex-end; gap: 15px; }.text-button { border: 0; background: transparent; color: #6575e9; padding: 0; font-size: 11px; }.text-button:hover { color: #334ee5; }.text-button.danger { color: #d18a8f; }.locked { color: #adb5c3; font-size: 10px; }
.notifications-section { max-width: 920px; }.notification-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }.notification-row { display: flex; gap: 13px; padding: 17px 20px; border-bottom: 1px solid #f0f2f6; }.notification-row:last-child { border-bottom: 0; }.notification-type { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: #5572f1; background: var(--blue-soft); }.notification-type.group { color: #d28b3d; background: #fff4e5; }.notification-body { min-width: 0; flex: 1; }.notification-top { display: flex; justify-content: space-between; gap: 15px; }.notification-top strong { font-size: 12px; }.notification-top span { color: #a8b0be; font-size: 10px; white-space: nowrap; }.notification-body p { margin: 6px 0; color: #606c82; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.notification-body small { color: #a7afbe; font-size: 10px; }.empty-state { padding: 43px 20px; text-align: center; color: #9ba6b9; }.empty-state strong { display: block; color: #6f7a8e; font-size: 13px; margin: 12px 0 5px; }.empty-state span { font-size: 11px; }.empty-icon { margin: auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #f0f3fa; color: #92a0b6; font-size: 18px; }.footer { color: #aab2c0; display: flex; justify-content: space-between; font: 10px "DM Mono", monospace; padding: 12px 0; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,29,52,.47); display: grid; place-items: center; padding: 20px; z-index: 5; }.modal { width: min(600px, 100%); background: #fff; border-radius: 17px; padding: 27px; box-shadow: 0 30px 80px rgba(20,29,52,.25); }.modal-head { display: flex; justify-content: space-between; }.modal h2 { margin: 8px 0 0; font-size: 21px; letter-spacing: -.05em; }.close { border: 0; background: #f2f4f8; color: #778196; width: 29px; height: 29px; border-radius: 50%; font-size: 20px; line-height: 1; }.modal-tip { background: #f7f8fc; color: #778298; border-radius: 8px; padding: 10px 12px; font-size: 10px; line-height: 1.6; margin: 18px 0; }.modal form { display: grid; gap: 14px; }.modal label { color: #667187; font-size: 11px; }.modal input, .modal textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid #e1e5ee; border-radius: 8px; padding: 10px 11px; outline: 0; color: var(--ink); font-size: 12px; }.modal textarea { min-height: 73px; resize: vertical; }.modal input:focus, .modal textarea:focus { border-color: #91a0ff; box-shadow: 0 0 0 3px #eff1ff; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.checkbox { display: flex !important; align-items: center; gap: 8px; }.checkbox input { width: auto; margin: 0; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 15px; color: #8994a9; font-size: 13px; }.spinner { width: 25px; height: 25px; border: 3px solid #e6eaf3; border-top-color: #536dff; border-radius: 50%; animation: spin .7s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.binding-info { display: grid; gap: 7px; margin: 15px 0; font-size: 11px; color: var(--muted); }
.binding-info code { color: var(--ink); overflow-wrap: anywhere; }
.account-error,.form-error,.error-banner { color: #b83d49; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.error-banner { padding: 12px; background: #fff0f1; border-radius: 10px; margin-bottom: 20px; }
.account-card-actions { flex-wrap: wrap; align-items: center; justify-content: flex-start; }
button:disabled { cursor: default; opacity: .45; transform: none !important; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline: 2px solid #536dff; outline-offset: 3px; }
.modal { max-height: 90vh; overflow-y: auto; }
.modal select { display: block; width: 100%; border: 1px solid #e1e5ee; border-radius: 8px; padding: 10px; margin-top: 6px; background: white; }
.modal details summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 5px 0 12px; }
.modal > p { font-size: 12px; line-height: 1.7; }
.setup-steps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style-position: inside; color: var(--muted); font-size: 12px; }
.setup-steps .current { color: var(--blue); font-weight: 700; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0; }
.modal a { color: var(--blue); }
.authorization-success { text-align: center; padding: 28px 0 10px; }
.authorization-success > span { display: block; color: var(--green); font-size: 36px; }
.authorization-success strong { display: block; margin-top: 10px; font-size: 16px; }
.authorization-success p { color: var(--muted); font-size: 12px; }
.connection-node > div { min-width: 0; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #1c2740; color: white; padding: 12px 20px; border-radius: 10px; opacity: 0; pointer-events: none; max-width: 90vw; z-index: 10; font-size: 13px; }
#toast.visible { opacity: 1; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f4f6fb; }
.auth-panel { width: min(420px, 100%); padding: 34px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-brand { margin-bottom: 34px; }
.auth-panel h1 { margin: 12px 0 8px; font-size: 25px; }
.auth-panel > p { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.auth-panel form { display: grid; gap: 15px; }
.auth-panel label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.auth-panel input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; color: var(--ink); font: inherit; outline: 0; }
.auth-panel input:focus { border-color: #91a0ff; box-shadow: 0 0 0 3px #eff1ff; }
.auth-panel small { display: block; margin-top: 20px; color: #9aa4b8; font-size: 11px; line-height: 1.6; }
.sidebar { position: sticky; top: 0; height: 100vh; }
.main-content { width: 100%; }
.empty-action { display: inline-block; margin-top: 18px; text-decoration: none; }
.account-card-actions a { text-decoration: none; }
.management-summary { display: flex; flex-wrap: wrap; gap: 24px; padding: 19px 24px; background: white; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.management-summary strong { color: var(--ink); margin-left: 10px; font-size: 20px; }
.management-list { display: grid; gap: 18px; }
.management-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.management-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.management-card h2 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.management-card .account-title p { color: var(--muted); margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.qq-avatar { color: #d86270; background: #fff0f1; }
.detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; margin: 25px 0; }
.detail-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.detail-grid dd { color: var(--ink); font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.detail-grid small { display: block; font-size: 11px; color: var(--muted); margin-top: 8px; }
.detail-grid .status { font-size: 12px; }
.detail-grid a { color: var(--blue); text-decoration: none; }
.info-banner { background: #edf0ff; border: 1px solid #e0e5ff; color: #6374b3; padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-size: 12px; line-height: 1.7; }
.log-filters { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.log-filters label { display: grid; gap: 8px; font-size: 12px; color: var(--muted); min-width: 150px; max-width: 100%; }
.log-filters select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--ink); background: white; font: inherit; }
.log-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.log-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.log-table th { color: var(--muted); background: #fafbfe; padding: 14px 18px; font-weight: 500; white-space: nowrap; }
.log-table td { padding: 15px 18px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.log-table td:first-child { white-space: nowrap; color: var(--muted); }
.log-level { border-radius: 5px; padding: 4px 8px; white-space: nowrap; }
.log-level.info { color: #15956a; background: var(--green-soft); }
.log-level.warning { color: #b87b24; background: #fff4e0; }
.log-level.error { color: #b83d49; background: #fff0f1; }
.authorization-target { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 20px; overflow-wrap: anywhere; }
.pairing-guide { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; margin-bottom: 28px; border: 1px solid #dfe5fc; border-radius: 12px; background: #eef2ff; }
.pairing-guide strong { font-size: 14px; color: #41558f; }
.pairing-guide p { color: #7382a6; font-size: 12px; line-height: 1.7; margin: 7px 0 0; }
.unpaired-counts { display: flex; flex-wrap: wrap; gap: 15px; color: #6575a1; font-size: 12px; flex-shrink: 0; }
.unpaired-counts b { color: var(--blue); font-size: 18px; margin-left: 6px; }
@media (max-width: 1050px) { .sidebar { width: 196px; }.metrics { grid-template-columns: repeat(2, 1fr); }.topbar { align-items: start; flex-direction: column; }.top-actions { width: 100%; }.last-sync { margin-right: auto; } }
@media (max-width: 680px) { .sidebar { display: none; }.main-content { padding: 28px 15px; }.topbar { margin-bottom: 25px; }.top-actions { flex-wrap: wrap; }.metrics { gap: 10px; margin-bottom: 30px; }.metric-card { min-height: 100px; padding: 14px; gap: 10px; }.metric-card strong { font-size: 18px; }.metric-card small { display: none; }.account-grid { grid-template-columns: 1fr; }.account-card { padding: 17px; }.connection-line { gap: 7px; }.connector i { width: 5px; }.account-meta { gap: 7px; }.footer { display: block; line-height: 2; }.form-grid { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 680px) { .app-shell { flex-direction: column; }.sidebar { display: flex; position: static; width: 100%; height: auto; padding: 18px 15px; }.brand { padding: 0 5px 18px; }.sidebar-foot { display: none; }.side-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }.side-nav a { font-size: 12px; gap: 6px; padding: 12px 9px; }.management-summary { gap: 12px 20px; padding: 16px; }.management-summary strong { font-size: 18px; }.management-card { padding: 18px; }.detail-grid { grid-template-columns: 1fr; gap: 17px; }.log-filters label { flex: 1; }.log-table { min-width: 600px; } }
@media (max-width: 850px) { .pairing-guide { align-items: flex-start; flex-direction: column; padding: 18px; } }
