.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 3px 8px; border: 1px solid #dce5df; background: #f4f7f5; border-radius: 5px; white-space: nowrap; }
.badge.connected, .badge.sent, .badge.delivered, .badge.read { color: #226c48; background: #eff8f0; border-color: #d3e8d7; }
.badge.failed, .badge.error { color: var(--red); background: #fff2f2; border-color: #f2d6dc; }
.badge.queued, .badge.sending, .badge.connecting, .badge.qr, .badge.password, .badge.unknown { color: var(--amber); background: #fbf7e8; border-color: #ede1b7; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; font-size: 11px; white-space: nowrap; }
th { color: var(--muted); background: #f7f9f7; font-size: 10px; font-weight: normal; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fbfcfa; }
td .mono { font-size: 10px; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .icon { width: 35px; height: 35px; color: #729c88; margin-bottom: 12px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 12px; max-width: 410px; margin: 0 auto 18px; white-space: normal; }
.table-action { padding: 6px 10px; min-height: 36px; font-size: 11px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.filters label { margin: 0; font-size: 11px; min-width: 140px; }
.filters select { display: block; margin-top: 7px; font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 11px; color: var(--muted); }
.pagination button { min-height: 36px; padding: 5px 12px; }
.key-list { display: grid; gap: 16px; }
.key-card { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.key-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.key-title { display: flex; align-items: center; gap: 12px; }
.key-title > .icon { background: #f0f4ef; box-sizing: content-box; padding: 10px; border-radius: 8px; color: #638071; }
.key-title small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.key-actions { display: flex; align-items: center; gap: 8px; }
.key-connections { padding: 5px 22px; }
.key-connection { display: flex; align-items: center; gap: 10px; min-height: 70px; border-bottom: 1px solid var(--line); font-size: 12px; }
.key-connection:last-child { border: none; }
.key-connection .channel-mark { width: 32px; height: 32px; border-radius: 7px; }
.key-connection .channel-mark .icon { width: 18px; height: 18px; }
.key-connection .badge { margin-inline-start: auto; }
.notice { border: 1px solid #d5e3dc; background: #f0f6f2; padding: 14px 16px; border-radius: 8px; font-size: 12px; margin-bottom: 22px; color: #3a6651; }
.notice.warning { background: #fcf8ec; border-color: #e9ddb8; color: #7e621e; }
.check-option { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 8px 0; font-size: 12px; }
.check-option input { width: 17px; min-height: 17px; height: 17px; accent-color: var(--green); }
.check-option .mono { margin-inline-start: auto; color: var(--muted); font-size: 10px; }
dialog { width: min(470px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; padding: 26px; color: var(--ink); background: white; box-shadow: 0 28px 100px #102b2b33; }
dialog::backdrop { background: #102b2b77; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.dialog-heading h2 { font-size: 18px; }
.icon-button { width: 40px; min-height: 40px; padding: 0; font-size: 24px; border: none; background: #f3f6f3; }
dialog .muted { font-size: 12px; }
.qr-area { display: grid; place-items: center; min-height: 280px; text-align: center; margin: 16px 0; background: #f8faf8; border: 1px dashed #c6d9cd; border-radius: 10px; padding: 12px; }
.qr-area img { max-width: 100%; width: 250px; height: auto; }
.connection-instructions { font-size: 12px; padding-inline-start: 22px; color: var(--muted); }
.connection-instructions li { margin-bottom: 9px; }
.connection-state { text-align: center; margin: 18px 0; }
.detail-list { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; font-size: 12px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; padding: 15px; background: #f5f8f4; border: 1px solid var(--line); border-radius: 8px; margin-top: 20px; font-size: 13px; }
.steps { display: grid; gap: 20px; counter-reset: step; margin: 22px 0; }
.step { display: flex; gap: 12px; font-size: 12px; }
.step::before { counter-increment: step; content: counter(step, persian); width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid #d6e3da; border-radius: 50%; background: #eff5ef; color: var(--green); }
.step p { font-size: 11px; color: var(--muted); margin-top: 4px; }
pre { position: relative; direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; background: #132e26; color: #d7eade; padding: 22px; border-radius: 8px; font: 12px/1.9 ui-monospace, Consolas, monospace; margin: 15px 0; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; }
.code-toolbar .mono { color: var(--green); }
.code-toolbar button { min-height: 36px; padding: 5px 10px; font-size: 11px; }
.tabs { display: flex; gap: 8px; margin: 15px 0 20px; border-bottom: 1px solid var(--line); }
.tabs button { border: none; border-radius: 0; background: none; padding: 8px 16px; color: var(--muted); }
.tabs button[aria-pressed="true"] { color: var(--green); border-bottom: 2px solid var(--green); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.send-result { padding: 18px; border: 1px solid #d5e6d9; border-radius: 8px; background: #f3f8f2; margin-top: 18px; }
.send-result p { font-size: 12px; margin: 8px 0; }
.inline-id { word-break: break-all; font-size: 11px; }
#toast { position: fixed; bottom: 24px; left: 24px; max-width: calc(100vw - 48px); background: var(--nav); color: white; padding: 13px 20px; border-radius: 10px; box-shadow: 0 8px 25px #102b2b22; z-index: 50; font-size: 12px; }
.mobile-logout { display: none; }
@media (max-width: 760px) { .mobile-logout { display: block; padding: 5px 10px; min-width: 44px; } .topbar-end .avatar { display: none; } }
@media (max-width: 760px) { .panel { padding: 16px; } .key-top { padding: 16px; align-items: flex-start; flex-direction: column; } .key-connections { padding: 4px 16px; } .key-connection { flex-wrap: wrap; padding: 12px 0; gap: 8px; } .key-actions { width: 100%; justify-content: space-between; } .filters label { flex: 1; min-width: 120px; } .form-row { grid-template-columns: 1fr; gap: 0; } .section-heading { align-items: flex-start; } .channel-card { padding: 18px; } }
