/* Page-specific bits on top of base.css (shared look with the other tools) */
.form { display: grid; gap: 12px; }
.suffix { color: var(--muted); font-size: 14px; white-space: nowrap; }
.form p { margin: 0; }
.form code { font-size: 12px; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }

/* Popups */
.dialog { width: min(480px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--fg); }
.dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-foot .actions { margin-left: auto; }

/* Select: own chevron with room on the right (no browser default arrow) */
select { font: inherit; font-size: 14px; color: var(--fg); border: 1px solid var(--border); border-radius: 8px; height: 36px; width: 100%;
  appearance: none; -webkit-appearance: none; padding: 0 34px 0 10px; cursor: pointer; background: var(--bg) no-repeat right 12px center / 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select:focus { outline: none; border-color: var(--primary); }
@media (max-width: 640px) { select, input { font-size: 16px !important; } }

/* Links table; rows stack on phones */
.links { width: 100%; border-collapse: collapse; table-layout: fixed; }
.links th { padding: 6px 8px; color: var(--muted); font-size: 13px; font-weight: 400; text-align: left; }
.links td { padding: 8px; border-top: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
.links th:first-child, .links td:first-child { padding-left: 0; }
.links th:last-child, .links td:last-child { padding-right: 0; }
.links a { text-decoration: none; }
.links .c-name { width: 24%; }
.links .c-mode { width: 170px; }
.links .c-act { width: 130px; }
.links .addr { color: var(--muted); font-size: 14px; }
.links .row-error td { padding-top: 0; border-top: 0; }
.links .empty td { padding: 12px 0; }
@media (max-width: 640px) {
  .links thead { display: none; }
  .links, .links tbody, .links tr, .links td { display: block; width: 100%; }
  .links tr { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
  .links td { padding: 0; border-top: 0; }
  .links .row-error { padding-top: 0; border-top: 0; }
}

/* /go/ prefix inside the name field */
.search-box { display: flex; align-items: center; height: 36px; padding: 0 0 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.search-box:focus-within { border-color: var(--primary); }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0 0 0 2px; border: 0; background: none; font-size: 14px; }
