.tg-dialog button:disabled,.tg-panel button:disabled {opacity:.45;cursor:not-allowed}
#user-telegram-settings {grid-column:1/-1}
#user-telegram-rights {display:flex;flex-wrap:wrap;gap:14px;margin:14px 0}
#user-telegram-settings .user-section-option {display:inline-flex;align-items:center;gap:7px}
#user-telegram-settings .tg-partner-actions {display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.tg-mail-audience {display:grid;grid-template-columns:1fr 1fr;gap:18px}
.tg-mail-audience fieldset {min-width:0;border:1px solid #dce5ed;border-radius:8px;padding:14px}
.tg-mail-audience input[type=search] {width:100%;box-sizing:border-box}
.tg-mail-options {max-height:240px;overflow:auto;display:grid;gap:8px;margin-top:12px}
.tg-mail-options label {display:flex;align-items:start;gap:8px;padding:7px;background:#f6f8fa;border-radius:6px}
.tg-mail-options input {width:16px;height:16px;margin:1px 0;flex-shrink:0}
.tg-mail-options small {display:block;color:#667c8e;font-size:12px;margin-top:3px}
.tg-mail-text-label {display:grid;gap:8px;margin:18px 0 6px}
.tg-mail-text-label textarea {width:100%;box-sizing:border-box;min-height:150px;border:1px solid #ccd8e3;border-radius:8px;padding:14px;font:inherit;resize:vertical}
.tg-mail-preview-text {white-space:pre-wrap;word-break:break-word;background:#f4f7fa;border:1px solid #dce5ed;padding:16px;border-radius:10px;font:inherit;line-height:1.5}
.tg-mail-history-item {border-top:1px solid #e3eaf0;padding:14px 0}
.tg-mail-history-item p {white-space:pre-wrap;word-break:break-word;max-height:140px;overflow:auto}
#tg-mail-preview-error {color:#a83429}
@media(max-width:650px) {.tg-mail-audience{grid-template-columns:1fr}}
.tg-tabs {display:flex;gap:8px;padding:0 0 12px;flex-wrap:wrap}
.tg-tabs a {padding:8px 14px;border:1px solid #dce5ed;border-radius:8px;text-decoration:none;background:#fff;color:#17465e}
.tg-panel .panel-head {display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.tg-panel h1 {margin:0 0 5px;font-size:24px}
.tg-toolbar {display:flex;align-items:end;gap:12px;margin:20px 0;flex-wrap:wrap}
.tg-toolbar label:first-child {flex:1;min-width:220px}
.tg-toolbar label {display:grid;gap:6px;font-size:13px}
.tg-table-wrap {overflow:auto}
.tg-table {width:100%;border-collapse:collapse;min-width:850px;font-size:13px}
.tg-table th,.tg-table td {padding:14px 10px;text-align:left;vertical-align:top;border-bottom:1px solid #e5eaf0;white-space:normal!important}
.tg-table th {font-size:12px;color:#526577;background:#f5f8fa}
.tg-table small {display:block;color:#6b7d8d;margin-top:4px}
.tg-table .tg-name {font-weight:600}
.tg-table button {font-size:12px;padding:7px 10px;margin:0 6px 6px 0;white-space:nowrap}
.tg-badge {display:inline-block;border-radius:6px;padding:3px 7px;background:#e8f6ee;color:#206340;font-size:12px}
.tg-badge.blocked {background:#fff0ee;color:#a8342b}.tg-badge.pending {background:#fff6dc;color:#866215}
.tg-dialog {width:min(780px,calc(100vw - 28px));max-height:90vh;padding:24px;border:1px solid #dce5ed;border-radius:14px;color:#20384b}
.tg-dialog::backdrop {background:rgba(15,32,48,.42)}
.tg-dialog-head {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.tg-dialog-head h2 {margin:0;font-size:21px}.tg-dialog form>label {display:grid;gap:7px;margin:12px 0}
.tg-dialog input:not([type=checkbox]) {width:100%;box-sizing:border-box;padding:10px;border:1px solid #cbd6e0;border-radius:6px}
.tg-dialog fieldset {border:1px solid #dce5ed;border-radius:8px;margin:18px 0;padding:15px}.tg-dialog legend {font-weight:600;padding:0 5px}
.tg-rights {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tg-rights label,.tg-shops label {display:flex;align-items:start;gap:9px;font-size:14px}
.tg-rights input,.tg-shops input,.tg-blocked input {width:16px;height:16px;margin:1px 0;flex-shrink:0;accent-color:#087c89}
.tg-shops {max-height:250px;overflow:auto;display:grid;gap:8px;margin-top:10px}.tg-shops label {padding:8px;background:#f6f8fa;border-radius:6px}.tg-shops small {display:block;color:#667c8e;font-size:12px;margin-top:3px}
.tg-shop-actions,.tg-editor-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.tg-shop-actions button {font-size:12px;padding:7px 10px}
.tg-dialog form>label.tg-blocked {display:flex;align-items:center;gap:8px}.tg-blocked {color:#9e392d}
#tg-editor-error {color:#a8342b}#tg-message {color:#526577}.tg-invitation {max-width:620px}.tg-invitation p {line-height:1.5}
@media(max-width:650px) {.tg-rights{grid-template-columns:1fr}.tg-dialog{padding:16px}.tg-toolbar>*{width:100%}.tg-panel .panel-head>button{width:100%}}

.tg-tabs a.is-active {background:#eaf1ff;border-color:#b6cbff;color:#1351ca;font-weight:600}

.tg-entry {color:inherit;text-decoration:none;cursor:pointer}
.tg-entry:focus-visible {outline:2px solid #1559f5;outline-offset:3px}

.tg-directory-content {display:grid;gap:22px;min-width:0;padding-top:18px}
.tg-directory-content > .panel {margin:0}
.tg-rate-exception {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;margin:12px 0}
.tg-rate-exception select {min-width:0;width:100%}
@media(max-width:650px){.tg-rate-exception{grid-template-columns:minmax(0,1fr) auto}.tg-rate-exception select{grid-column:1 / -1}}

#tg-rate-settings-form fieldset {border:1px solid #dce5ed;border-radius:8px;padding:16px;margin:16px 0}
