.server-page-head { align-items: center; }
.revision-badge { background: #dfefff; color: #075f98; border: 1px solid #b9d8ef; border-radius: 20px; padding: 8px 13px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.server-metrics { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.server-metrics .metric { padding: 16px 18px; }
.server-metrics .metric strong { font-size: 28px; }
.editor-head, .list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.server-form { padding: 0 22px 22px; }
.form-section { padding: 20px 0; border-bottom: 1px solid #e1ebf2; }
.form-section h3 { margin: 0 0 14px; font-size: 16px; }
.server-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.server-fields label { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 13px; }
.server-fields input { width: 100%; height: 46px; border: 1px solid #bfd2e1; border-radius: 6px; padding: 0 13px; background: #f9fcfe; font: inherit; color: var(--text); }
.server-fields input:focus { outline: 2px solid rgba(8,119,189,.18); border-color: var(--blue); }
.server-fields input[readonly] { background: #edf3f7; color: #526779; }
.config-fields { grid-template-columns: 1fr 1fr; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker strong { height: 46px; display: flex; align-items: center; justify-content: center; border: 1px dashed #7fb4d6; border-radius: 6px; color: #075f98; background: #eef8fe; cursor: pointer; padding: 0 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-picker:focus-within strong, .file-picker:hover strong { border-color: var(--blue); background: #e1f3fd; }
.server-options { display: flex; gap: 12px; padding: 18px 0; flex-wrap: wrap; }
.toggle-option { min-height: 48px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 9px 13px; background: #f9fcfe; cursor: pointer; }
.toggle-option input { position: absolute; opacity: 0; }
.toggle-option span { width: 39px; height: 22px; background: #aab9c4; border-radius: 12px; position: relative; transition: .2s; }
.toggle-option span::after { content: ''; position: absolute; width: 16px; height: 16px; top: 3px; right: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.22); transition: .2s; }
.toggle-option input:checked + span { background: var(--green); }
.toggle-option input:checked + span::after { transform: translateX(-17px); }
.save-server { width: 100%; min-height: 48px; }
.server-name { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.server-flag { width: 40px; height: 40px; border: 1px solid #d7e3ec; background: #f4f8fb; border-radius: 6px; display: grid; place-items: center; font-size: 23px; flex: 0 0 auto; }
.endpoint { font-size: 12px; word-break: break-all; }
.server-table { min-width: 1260px; }
.server-table td { padding-top: 12px; padding-bottom: 12px; }
.server-actions { min-width: 170px; }
.server-list-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-list-actions form { margin: 0; }
.badge.amber { background: #fff3cd; color: #7a5b09; }
.alert-settings { padding-bottom: 20px; }
.alert-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.alert-settings-form { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(260px, 1.4fr) minmax(210px, 1fr) minmax(170px, .7fr); gap: 14px; align-items: end; padding: 0 22px; }
.alert-settings-form > label:not(.toggle-option):not(.clear-token) { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: 13px; }
.alert-settings-form input[type="password"], .alert-settings-form input[type="text"], .alert-settings-form input[type="number"], .alert-settings-form input:not([type]) { width: 100%; height: 46px; border: 1px solid #bfd2e1; border-radius: 6px; padding: 0 13px; background: #f9fcfe; font: inherit; color: var(--text); }
.alert-settings-form input:focus { outline: 2px solid rgba(8,119,189,.18); border-color: var(--blue); }
.alert-toggle { min-height: 46px; }
.clear-token { display: inline-flex; align-items: center; gap: 8px; color: #9b2c2c; font-size: 13px; }
.alert-test-form { display: inline-block; margin: 14px 22px 0; }
.alert-note { display: block; margin: 12px 22px 0; color: var(--muted); }

@media (max-width: 850px) {
  .server-metrics { grid-template-columns: repeat(2, 1fr); }
  .server-fields { grid-template-columns: repeat(2, 1fr); }
  .alert-settings-form { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .server-page-head, .editor-head, .list-head { align-items: flex-start; }
  .server-page-head { gap: 10px; }
  .server-form { padding: 0 15px 15px; }
  .server-fields, .config-fields { grid-template-columns: 1fr; }
  .server-options { display: grid; grid-template-columns: 1fr; }
  .toggle-option { width: 100%; }
  .alert-settings-head { align-items: flex-start; }
  .alert-settings-form { grid-template-columns: 1fr; padding: 0 15px; }
  .alert-test-form { margin: 14px 15px 0; }
  .alert-note { margin: 12px 15px 0; }
  .server-table-wrap { overflow: visible; padding: 10px; }
  .server-table, .server-table tbody, .server-table tr, .server-table td { display: block; min-width: 0; width: 100%; }
  .server-table thead { display: none; }
  .server-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; padding: 12px; background: #fff; }
  .server-table td { border: 0; padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
  .server-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; flex: 0 0 92px; }
  .server-table td:first-child { display: block; border-bottom: 1px solid #e1ebf2; padding-bottom: 12px; margin-bottom: 4px; }
  .server-table td:first-child::before { display: none; }
  .server-table td:last-child { display: block; border-top: 1px solid #e1ebf2; margin-top: 5px; padding-top: 12px; }
  .server-table td:last-child::before { display: none; }
  .server-actions { min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .server-actions .btn, .server-actions form { width: 100%; }
  .server-actions form .btn { min-height: 39px; }
}
