:root {
  color-scheme: dark;
  --bg: #0b1018;
  --panel: #131b27;
  --panel-hover: #192433;
  --input: #0d1520;
  --line: #253142;
  --line-soft: #1d2837;
  --text: #ecf1f7;
  --muted: #8e9caf;
  --soft: #bbc6d4;
  --accent: #8ce0c0;
  --accent-dark: #102f2b;
  --blue: #88b9ff;
  --yellow: #f0c677;
  --red: #f99a9e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; background: var(--panel-hover); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button:not(:disabled):hover { background: #243246; }
.button-primary { background: var(--accent); color: #102a24; }
.button-primary:not(:disabled):hover { background: #abefd5; }
.button-ghost { background: transparent; border-color: var(--line); color: var(--soft); }
.button-ghost:not(:disabled):hover { border-color: #425169; background: #1a2534; }
.button-danger { background: #382129; color: #ffb3b6; border-color: #65313e; }
.button-danger:not(:disabled):hover { background: #4b2933; }
.button-small { min-height: 33px; padding: 6px 11px; font-size: 12px; }
.button-small svg { width: 15px; height: 15px; }
.button-icon { width: 36px; min-height: 36px; padding: 8px; }
.button-block { width: 100%; }
.text-link { color: var(--accent); font-size: 13px; }
.text-link:hover { text-decoration: underline; }
.eyebrow { display: block; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 25px; font-weight: 700; letter-spacing: -.05em; }
.brand-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #0c2c23; font-size: 22px; font-weight: 800; letter-spacing: -.08em; box-shadow: 0 4px 20px #8ce0c012; }
.brand-dot { color: var(--accent); }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1fr); }
.login-story { display: flex; flex-direction: column; align-items: flex-start; padding: 54px clamp(40px, 7vw, 110px); background: radial-gradient(ellipse at 30% 55%, #19332f55, transparent 65%), #101925; border-right: 1px solid var(--line-soft); }
.login-story .brand { margin-bottom: auto; }
.login-story-content { max-width: 500px; padding: 72px 0; }
.login-story h1 { margin-top: 20px; font-size: clamp(32px, 3.3vw, 47px); line-height: 1.38; letter-spacing: -.055em; }
.login-story p { color: var(--muted); font-size: 15px; line-height: 1.9; margin-top: 22px; max-width: 370px; word-break: keep-all; }
.login-flow { display: flex; align-items: center; gap: 12px; margin-top: 46px; }
.flow-step { display: flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid #33463f; border-radius: 8px; font-size: 12px; color: #c2dacd; }
.flow-step span { color: var(--accent); font-size: 10px; }
.flow-line { width: 19px; height: 1px; background: #405147; }
.login-footnote { font-size: 11px; color: #64788a; letter-spacing: .03em; }
.login-panel { display: grid; place-items: center; padding: 45px; }
.login-card { width: 100%; max-width: 350px; }
.login-card .eyebrow { color: var(--muted); margin-bottom: 15px; }
.login-card h2 { font-size: 27px; letter-spacing: -.04em; }
.login-card > p { color: var(--muted); margin: 12px 0 32px; line-height: 1.65; }
.login-card .button { margin-top: 10px; min-height: 46px; }
.login-help { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-error, .form-error { border: 1px solid #733644; background: #351c26; color: #ffc1c5; border-radius: 8px; padding: 11px 13px; margin-bottom: 16px; font-size: 12px; line-height: 1.6; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; display: flex; flex-direction: column; padding: 29px 17px 18px; background: #101822; border-right: 1px solid var(--line-soft); z-index: 20; }
.sidebar .brand { padding: 0 13px; margin-bottom: 37px; }
.nav-label { color: #62748a; padding: 0 14px; margin: 15px 0 10px; font-size: 10px; letter-spacing: .12em; font-weight: 700; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 9px; padding: 12px 13px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; margin-bottom: 5px; }
.nav-button:hover { background: #1a2532; color: var(--text); }
.nav-button.active { background: #1c312e; border-color: #294a40; color: var(--accent); }
.nav-button svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; padding: 1px 5px; background: #35453a; color: var(--accent); border-radius: 4px; font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.sidebar-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 10px 20px; font-size: 11px; line-height: 1.7; color: #687b8d; }
.sidebar-note svg { width: 15px; height: 15px; margin-top: 2px; }
.profile-card { display: flex; gap: 10px; padding: 14px 9px 4px; border-top: 1px solid var(--line); align-items: center; }
.avatar { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; background: #29384c; color: #b3c8e2; font-size: 12px; font-weight: 700; }
.profile-info { min-width: 0; flex: 1; }
.profile-info strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.profile-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.logout-button { border: 0; background: transparent; color: var(--muted); padding: 7px; border-radius: 6px; }
.logout-button:hover { color: var(--text); background: var(--panel-hover); }
.logout-button svg { width: 16px; height: 16px; }
.workspace { margin-left: 224px; min-width: 0; }
.topbar { height: 68px; border-bottom: 1px solid var(--line-soft); padding: 0 40px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; background: #0d141eaa; }
.topbar .breadcrumb-current { color: var(--soft); }
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px #8ce0c040; }
.main-content { max-width: 1550px; padding: 34px 40px 48px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 27px; }
.page-heading h1 { font-size: 26px; letter-spacing: -.04em; line-height: 1.4; }
.page-heading p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; word-break: keep-all; }
.heading-actions { display: flex; gap: 8px; flex-shrink: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 32px; }
.metric { position: relative; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { font-size: 29px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; }
.metric-icon { position: absolute; top: 21px; right: 21px; color: #62758b; }
.metric-caption { color: #65778b; font-size: 10px; }
.metric-active .metric-value, .metric-active .metric-icon { color: var(--accent); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.section-heading p { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 6px; }
.count-label { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); background: #202b3b; min-width: 21px; min-height: 20px; padding: 2px 6px; border-radius: 5px; }
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 34px; }
.target-card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: linear-gradient(145deg, #16202d, #111a25); display: flex; flex-direction: column; min-width: 0; }
.target-card:hover { border-color: #3e5367; }
.target-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.protocol-icon { width: 38px; height: 38px; display: grid; place-items: center; background: #1c3433; border: 1px solid #2c4743; color: #8bd3b9; border-radius: 10px; }
.protocol-icon.rdp { background: #1c2b43; border-color: #2e425f; color: #9bbcf1; }
.protocol-tag { font-size: 10px; font-weight: 600; letter-spacing: .08em; padding: 4px 6px; border: 1px solid #344052; border-radius: 4px; color: #a9b7c9; }
.target-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
.target-address { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; line-height: 1.6; }
.target-details { display: flex; justify-content: space-between; gap: 10px; color: #7d8fa3; font-size: 10px; margin: 15px 0 19px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.target-card .button { margin-top: auto; min-height: 35px; font-size: 11px; }
.target-card .button svg { width: 14px; height: 14px; }
.target-card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 15px; }
.native-connection-info { margin-bottom: 17px; padding: 15px; border: 1px solid #2a4151; border-radius: 9px; background: #0e1b27; }
.native-compact { margin-bottom: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.native-address-row { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 10px; color: var(--muted); }
.native-address-row strong { color: #b0d9e2; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.native-command-row { display: flex; align-items: center; gap: 7px; padding: 9px; border: 1px solid #2b3b4f; border-radius: 7px; background: #0b131e; }
.native-command-row code { flex: 1; min-width: 0; color: #b3c7d8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; user-select: all; }
.native-command-row .button { flex-shrink: 0; min-height: 27px; padding: 4px 7px; font-size: 9px; }
.native-connection-info .field-help { font-size: 10px; margin-top: 9px; }
.native-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 24px; margin: 0 0 28px; padding: 20px 22px; border: 1px solid #2c4145; border-radius: 11px; background: linear-gradient(130deg, #13272a, #12202b); }
.native-guide h3 { display: flex; gap: 7px; align-items: center; color: #b4ddcf; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.native-guide h3 svg { width: 15px; height: 15px; }
.native-guide p { color: #90a9b6; font-size: 11px; line-height: 1.85; word-break: keep-all; }
.native-guide .native-guide-note { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #2c4145; color: #7896a4; font-size: 10px; }
.native-ip { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.identity-badge { margin-top: 7px; font-size: 9px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { background: #111a25; color: #7f91a7; font-size: 10px; font-weight: 500; padding: 13px 18px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff02; }
.cell-title { display: block; font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.6; }
.cell-subtitle { display: block; margin-top: 4px; color: #71849a; font-size: 10px; line-height: 1.55; }
.cell-reason { color: var(--soft); max-width: 300px; min-width: 130px; word-break: break-word; white-space: pre-wrap; line-height: 1.65; }
.cell-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 80px; }
.cell-actions .button { min-height: 29px; font-size: 10px; padding: 5px 9px; }
.nowrap { white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; font-size: 10px; line-height: 1.35; font-weight: 600; padding: 5px 7px; white-space: nowrap; border: 1px solid transparent; }
.status-pending { color: var(--yellow); background: #392f1d; border-color: #4b3c23; }
.status-approved, .status-active { color: #93e1be; background: #19392e; border-color: #29563f; }
.status-connecting { color: #a6c8ff; background: #20324d; border-color: #304a72; }
.status-denied, .status-revoked, .status-failed { color: #f3a7ac; background: #3a232c; border-color: #53313c; }
.status-expired, .status-closed, .status-neutral { color: #9daabc; background: #263141; border-color: #344153; }
.status-dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.filter-button { padding: 7px 12px; border-radius: 7px; font-size: 11px; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.filter-button.active { color: var(--accent); background: #18312b; border-color: #325345; }
.filter-button:hover { color: var(--text); }
.empty-state { padding: 40px 22px; text-align: center; border: 1px dashed #2d3b4e; border-radius: 12px; background: #101925; }
.panel .empty-state { border: 0; border-radius: 0; }
.empty-icon { margin: 0 auto 13px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #202c3c; color: #8095ae; }
.empty-state h3 { font-size: 13px; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 8px; word-break: keep-all; }
.empty-state .button { margin-top: 19px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); min-height: 240px; font-size: 12px; }
.spinner { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #2b3a4d; border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { display: flex; gap: 10px; padding: 13px 16px; border-radius: 9px; background: #152632; color: #a7bece; border: 1px solid #284050; font-size: 11px; line-height: 1.75; margin-bottom: 22px; word-break: keep-all; }
.notice svg { width: 16px; height: 16px; margin-top: 2px; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 22px; font-size: 10px; color: #607187; line-height: 1.65; }

.form-field { margin-bottom: 18px; min-width: 0; }
.form-field > label { display: block; font-size: 12px; font-weight: 500; color: #c7d2e0; margin-bottom: 8px; }
.field-required { color: var(--accent); margin-left: 3px; }
.input { width: 100%; min-height: 42px; border: 1px solid #304055; background: var(--input); color: var(--text); border-radius: 8px; padding: 10px 12px; outline: none; transition: border-color .15s; }
.input:hover { border-color: #43546b; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #8ce0c010; }
.input::placeholder { color: #5c7086; font-size: 12px; }
.input:disabled { opacity: .55; }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.7; }
.input-monospace { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.field-help { font-size: 10px; color: #7e91a7; line-height: 1.7; margin-top: 7px; word-break: keep-all; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-two { grid-column: 1 / -1; }
.form-section { padding: 20px 0 2px; margin-top: 4px; border-top: 1px solid var(--line); }
.form-section h3 { font-size: 12px; margin-bottom: 17px; }
.credential-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.telegram-commands { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; }
.telegram-commands > div { display: grid; grid-template-columns: 83px 1fr; gap: 10px; align-items: baseline; }
.telegram-commands dt, .telegram-commands dd { margin: 0; font-size: 10px; line-height: 1.8; }
.telegram-commands code { color: var(--accent); font-size: 10px; }
.telegram-commands dd { color: #93a4b8; word-break: keep-all; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.6; padding: 6px 0; color: var(--soft); cursor: pointer; }
.checkbox-row input { accent-color: var(--accent); width: 15px; height: 15px; margin: 2px 0 0; flex-shrink: 0; }
.checkbox-row strong { font-weight: 500; }
.checkbox-row small { display: block; color: var(--muted); font-size: 10px; }
.user-checklist { max-height: 180px; overflow-y: auto; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); }
.dialog { width: min(520px, calc(100vw - 36px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #3b4b60; padding: 0; border-radius: 15px; background: #151e2b; color: var(--text); box-shadow: 0 25px 100px #0007; }
.dialog-wide { width: min(670px, calc(100vw - 36px)); }
.dialog::backdrop { background: #050a12cc; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 25px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 19px; letter-spacing: -.035em; }
.dialog-header p { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; word-break: keep-all; }
.dialog-body { padding: 23px 25px 5px; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 18px 25px 23px; }
.dialog .target-summary { display: flex; align-items: center; gap: 13px; background: #0e1722; border: 1px solid var(--line); border-radius: 9px; padding: 14px; margin-bottom: 20px; }
.target-summary strong { display: block; font-size: 12px; }
.target-summary p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.settings-grid { display: grid; grid-template-columns: minmax(300px, 1.25fr) minmax(260px, .8fr); gap: 24px; align-items: start; }
.settings-card { padding: 25px; }
.settings-title { display: flex; align-items: center; gap: 11px; margin-bottom: 23px; }
.settings-title h2 { font-size: 15px; }
.settings-title p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.settings-title .protocol-icon { background: #1f3550; color: #9ac9ff; border-color: #2d4b6b; }
.settings-buttons { display: flex; gap: 8px; padding-top: 9px; }
.guide-card { border: 1px solid var(--line-soft); border-radius: 12px; padding: 24px; }
.guide-card h3 { font-size: 13px; margin-bottom: 18px; }
.guide-list { padding: 0; margin: 0; list-style: none; counter-reset: guides; }
.guide-list li { position: relative; padding-left: 28px; color: #93a4b8; font-size: 11px; line-height: 1.8; margin-bottom: 18px; word-break: keep-all; }
.guide-list li::before { counter-increment: guides; content: counter(guides); position: absolute; top: 2px; left: 0; background: #263347; color: #a8bbd3; border-radius: 5px; display: grid; place-items: center; font-size: 10px; width: 18px; height: 18px; }
.guide-card .text-link { font-size: 11px; }
.connection-info { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #101925; font-size: 11px; }
.telegram-connections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.telegram-connection-card { padding: 23px; display: flex; flex-direction: column; min-width: 0; }
.telegram-card-heading { display: flex; align-items: flex-start; gap: 12px; }
.telegram-card-heading > div { flex: 1; min-width: 0; }
.telegram-card-heading h2 { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.telegram-card-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.telegram-card-heading .status-badge { margin-top: 4px; flex-shrink: 0; }
.telegram-card-details { display: flex; flex-wrap: wrap; gap: 11px 20px; padding-top: 21px; color: var(--muted); font-size: 11px; }
.telegram-card-details > span { display: flex; align-items: center; gap: 7px; }
.telegram-card-details svg { width: 14px; height: 14px; }
.telegram-connection-card > .field-help { margin-top: 12px; overflow-wrap: anywhere; }
.telegram-connection-card > .telegram-assignment-needed { color: var(--yellow); }
.telegram-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; margin-top: auto; }
.telegram-guide { margin-top: 24px; padding: 0; }
.telegram-guide summary { display: flex; align-items: center; gap: 10px; padding: 19px 23px; cursor: pointer; color: var(--soft); font-size: 12px; font-weight: 500; list-style: none; }
.telegram-guide summary::-webkit-details-marker { display: none; }
.telegram-guide summary > svg { width: 16px; height: 16px; }
.telegram-guide summary > svg:last-child { margin-left: auto; transition: transform .15s; }
.telegram-guide[open] summary > svg:last-child { transform: rotate(90deg); }
.telegram-guide-body { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 22px 23px 24px; border-top: 1px solid var(--line-soft); }
.telegram-guide .telegram-commands > div { grid-template-columns: 105px 1fr; }
.telegram-command-intro { margin: -7px 0 16px; }
.telegram-user-fields { margin: 2px 0 18px; padding: 18px 16px 0; border: 1px solid var(--line); border-radius: 9px; background: var(--input); }
.request-search-panel { margin-bottom: 25px; padding: 20px; }
.request-search-form { display: grid; grid-template-columns: minmax(230px, 2.2fr) minmax(125px, 1fr) minmax(115px, .9fr) minmax(125px, .9fr) auto; gap: 12px; align-items: end; }
.request-search-form .form-field { margin: 0; }
.request-search-form label { font-size: 11px; }
.request-search-form .input { font-size: 12px; min-width: 0; }
.request-search-form > .button { min-height: 42px; padding: 10px 12px; }
.request-search-note { display: flex; justify-content: space-between; gap: 16px; margin-top: 15px; font-size: 10px; color: var(--muted); line-height: 1.75; }
.request-search-note > span:last-child { flex-shrink: 0; }
.request-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.request-results-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.request-results-heading > span { font-size: 10px; }
.admin-request-table { min-width: 900px; }
.admin-request-table td { padding-top: 18px; padding-bottom: 18px; }
.admin-request-table .cell-reason { min-width: 155px; max-width: 280px; }
.channel-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--soft); font-size: 11px; }
.channel-badge svg { width: 14px; height: 14px; color: var(--muted); }
.channel-native svg { color: var(--accent); }
.channel-web svg { color: var(--blue); }
.request-pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 17px; }
.request-pagination > span { font-size: 10px; }
.request-pagination > div { display: flex; align-items: center; gap: 9px; }
.pagination-current { min-width: 27px; text-align: center; color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
#admin-request-results[aria-busy="true"] .request-results-heading > span { opacity: .5; }
.toasts { position: fixed; z-index: 1000; bottom: 25px; right: 25px; width: min(370px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 9px; }
.toast { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #3c5c50; border-radius: 10px; padding: 14px 16px; background: #1a2e28; box-shadow: 0 8px 30px #0004; color: #bcebd5; font-size: 12px; line-height: 1.6; animation: slide-in .2s ease-out; }
.toast-error { border-color: #6e3d4b; background: #38242d; color: #ffc4c7; }
.toast svg { width: 17px; height: 17px; margin-top: 1px; }
@keyframes slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.noscript { margin: 40px; color: var(--muted); }

.remote-body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.remote-toolbar { min-height: 66px; padding: 12px 22px; display: flex; align-items: center; gap: 18px; background: #111a26; border-bottom: 1px solid var(--line); }
.remote-brand { font-size: 21px; }
.remote-brand .brand-symbol { width: 29px; height: 29px; font-size: 18px; border-radius: 8px; }
.remote-heading { border-left: 1px solid #334056; padding-left: 18px; min-width: 0; }
.remote-heading strong { display: block; font-size: 12px; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-heading span { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.remote-actions { display: flex; gap: 8px; margin-left: auto; }
.remote-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #080c12; outline: none; touch-action: none; }
.remote-display { position: absolute; top: 0; left: 0; }
.remote-display > div { transform-origin: top left; }
.remote-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 25px; background: radial-gradient(ellipse at 50% 40%, #18312950, transparent 65%), #0b121c; }
.remote-overlay[hidden] { display: none; }
.remote-overlay-card { text-align: center; max-width: 450px; }
.connection-mark { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 25px; font-size: 35px; color: var(--accent); border: 1px solid #2b4c41; background: #18372c; border-radius: 18px; }
.remote-overlay h1 { font-size: 23px; letter-spacing: -.04em; margin: 14px 0; }
.remote-overlay p { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 0 auto 25px; word-break: keep-all; white-space: pre-line; }
.remote-overlay .text-link { display: block; margin-top: 20px; font-size: 11px; }
.remote-footer { display: flex; justify-content: space-between; gap: 14px; padding: 9px 22px; background: #111a26; border-top: 1px solid var(--line); color: #73869e; font-size: 10px; line-height: 1.5; }
.session-countdown { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

@media (min-width: 1600px) { .target-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .settings-grid { grid-template-columns: 1fr; } .main-content { padding: 29px 28px 40px; } .topbar { padding: 0 28px; } }
@media (max-width: 900px) { .sidebar { width: 190px; padding-left: 12px; padding-right: 12px; } .workspace { margin-left: 190px; } .sidebar .brand { padding-left: 10px; } .metric { padding: 17px; } .metric-icon { display: none; } .metric-caption { font-size: 9px; } .login-story { padding-left: 40px; padding-right: 35px; } .login-flow { gap: 6px; } .flow-step { font-size: 10px; padding: 7px; } .flow-line { width: 10px; } }
@media (max-width: 1200px) { .request-search-form { grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto; } .request-search-form > .form-field:first-child { grid-column: 1 / -1; } .request-search-form > .form-field:nth-child(4) { grid-column: 1 / 3; } .request-search-note { flex-direction: column; gap: 7px; } }
@media (max-width: 1000px) { .telegram-connections { grid-template-columns: 1fr; } .telegram-guide-body { grid-template-columns: 1fr; gap: 25px; } }
@media (max-width: 720px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-story { padding: 26px 25px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-story-content { padding: 35px 0 10px; }
  .login-story h1 { font-size: 28px; }
  .login-story p { font-size: 12px; margin-top: 14px; }
  .login-story .eyebrow, .login-flow, .login-footnote { display: none; }
  .login-panel { padding: 35px 25px 50px; }
  .login-card { max-width: 100%; }
  .login-card > .eyebrow { display: none; }
  .login-card h2 { font-size: 22px; }
  .login-card > p { margin-bottom: 24px; }
  .sidebar { position: relative; width: 100%; padding: 18px 19px 10px; border-right: 0; border-bottom: 1px solid var(--line); display: block; }
  .sidebar .brand { font-size: 22px; padding: 0; margin-bottom: 20px; }
  .sidebar .brand-symbol { width: 30px; height: 30px; font-size: 19px; }
  .sidebar nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
  .nav-label { display: none; }
  .nav-button { width: auto; flex-shrink: 0; padding: 9px 10px; margin: 0; font-size: 11px; gap: 7px; }
  .nav-button svg { width: 15px; height: 15px; }
  .sidebar-bottom { position: absolute; top: 14px; right: 15px; padding: 0; }
  .sidebar-note { display: none; }
  .profile-card { padding: 0; border: 0; gap: 7px; }
  .avatar { display: none; }
  .profile-info strong { max-width: 105px; font-size: 11px; }
  .profile-info span { font-size: 9px; margin-top: 3px; text-align: right; }
  .workspace { margin-left: 0; }
  .topbar { display: none; }
  .main-content { padding: 25px 19px 35px; }
  .page-heading { align-items: flex-start; margin-bottom: 22px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { font-size: 11px; }
  .page-heading .button { min-height: 35px; padding: 8px 10px; font-size: 11px; }
  .heading-actions .button-icon { width: 33px; }
  .heading-actions .button svg { width: 15px; height: 15px; }
  .metric-grid { gap: 8px; margin-bottom: 26px; }
  .metric { padding: 14px 12px; gap: 10px; border-radius: 9px; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 24px; }
  .metric-caption { display: none; }
  .target-grid { gap: 10px; margin-bottom: 28px; }
  .target-card { padding: 15px; border-radius: 9px; }
  .native-guide { grid-template-columns: 1fr; gap: 16px; padding: 18px; margin-bottom: 24px; }
  .target-card h3 { font-size: 13px; }
  .target-card-top { margin-bottom: 14px; }
  .target-details { flex-direction: column; gap: 6px; margin-top: 12px; }
  .target-address { font-size: 10px; }
  .protocol-icon { width: 32px; height: 32px; border-radius: 8px; }
  .protocol-icon svg { width: 17px; height: 17px; }
  .page-footer { flex-direction: column; gap: 5px; }
  th { padding: 12px 14px; } td { padding: 14px; }
  .settings-card, .guide-card { padding: 20px; }
  .telegram-connection-card { padding: 19px; }
  .telegram-guide { padding: 0; }
  .telegram-guide summary { padding: 18px 19px; }
  .telegram-guide-body { padding: 20px 19px; }
  .request-search-panel { padding: 16px; margin-bottom: 22px; }
  .request-search-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px 10px; }
  .request-search-form > .form-field:nth-child(4) { grid-column: auto; }
  .request-search-form > .button { justify-self: start; min-height: 35px; font-size: 11px; padding: 8px 12px; }
  .request-search-note { margin-top: 13px; }
  .request-pagination { flex-wrap: wrap; }
  .request-pagination > div { margin-left: auto; }
  .request-results-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .remote-toolbar { padding: 10px 13px; gap: 10px; min-height: 61px; flex-wrap: wrap; }
  .remote-brand { font-size: 0; gap: 0; }
  .remote-heading { padding-left: 10px; }
  .remote-heading strong { max-width: 36vw; }
  .remote-heading span { display: none; }
  .remote-toolbar .status-badge { margin-left: auto; }
  .remote-actions { gap: 5px; margin-left: 0; }
  .remote-actions .button { font-size: 10px; padding: 5px 8px; }
  .session-countdown { display: none; }
  .remote-footer { padding: 9px 13px; font-size: 9px; }
  #remote-hint { display: none; }
}
@media (max-width: 420px) { .target-grid { grid-template-columns: 1fr; } .target-details { flex-direction: row; } .form-grid { grid-template-columns: 1fr; } .span-two { grid-column: auto; } .dialog-header { padding: 20px; } .dialog-body { padding: 20px 20px 0; } .dialog-footer { padding: 18px 20px 20px; } .remote-heading strong { max-width: 29vw; } .page-heading { flex-wrap: wrap; } .heading-actions { margin-left: auto; } .telegram-card-heading { gap: 9px; } .telegram-card-heading h2 { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
