/* httpspac portal — M8+ layout; M12 admin table align + Copy URL sizing */
body {
  font-family: system-ui, sans-serif;
  max-width: 80rem;
  margin: 2rem auto;
  padding: 0 1rem;
}
body.login {
  max-width: 28rem;
  margin: 3rem auto;
}
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
header.top h1 {
  margin: 0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.env-badge-b {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
  user-select: none;
}
.portal-ver {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.28rem 0.55rem;
  white-space: nowrap;
  user-select: none;
}
form.logout {
  margin: 0;
}
label {
  display: block;
  margin-top: 1rem;
}
input {
  width: 100%;
  padding: 0.4rem;
  box-sizing: border-box;
}
button {
  margin-top: 1.2rem;
  padding: 0.5rem 1rem;
}
form.logout button {
  margin-top: 0;
}
form.inline {
  display: inline-block;
  margin: 0.15rem 0.15rem 0.15rem 0;
  vertical-align: middle;
}
form.inline button,
button.copy-pac,
button.copy-secret {
  margin-top: 0;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  vertical-align: middle;
}
.secret-row {
  margin: 0.35rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.secret-label {
  font-weight: 600;
  min-width: 7rem;
}
.secret-masked {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.05em;
  color: #444;
}
.flash-copies {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  background: #f6f8fa;
  border-radius: 4px;
}
td.pac button.copy-secret,
td.proxy-user button.copy-secret {
  margin: 0.1rem 0.15rem 0.1rem 0;
  display: inline-block;
}
form.inline input.days,
form.inline input.amount {
  width: 3.5rem;
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.2rem;
  vertical-align: middle;
}
form.inline select.unit,
form.inline select.tz {
  width: auto;
  max-width: 5.5rem;
  display: inline-block;
  margin: 0 0.15rem;
  padding: 0.15rem;
  vertical-align: middle;
  font-size: 0.85rem;
}
form.create select {
  max-width: 8rem;
  display: inline-block;
  margin: 0.25rem 0.35rem 0 0;
  padding: 0.3rem;
  vertical-align: middle;
}
form.create input.amount {
  max-width: 10rem;
  display: inline-block;
  width: auto;
  margin-right: 0.35rem;
}
form.create label {
  margin-top: 0.6rem;
}
form.create input {
  max-width: 24rem;
  display: block;
}
form.create label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
form.create label.check input {
  width: auto;
  margin: 0;
}
.notes-inline {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #444;
}
form.pac-domains label {
  margin-top: 0.6rem;
}
form.pac-domains textarea {
  display: block;
  width: 100%;
  max-width: 36rem;
  min-height: 14rem;
  margin-top: 0.35rem;
  padding: 0.4rem;
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.35;
}
form.pac-domains button {
  margin-top: 0.8rem;
}
ul.notes {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: #333;
}
ul.notes code {
  font-size: 0.85rem;
}
.ok {
  color: #060;
  margin-top: 0.5rem;
  word-break: break-all;
}
td.actions {
  white-space: normal;
  min-width: 14rem;
  vertical-align: top;
}
td.actions form.inline {
  margin: 0.1rem 0.2rem 0.1rem 0;
}
td.actions .slot-staff {
  display: block;
  margin: 0.35rem 0 0.15rem;
  padding: 0.35rem 0.45rem;
  border-top: 1px solid #e5e7eb;
  border-radius: 4px;
}
td.actions .slot-staff:first-of-type {
  border-top: 0;
  margin-top: 0.25rem;
}
td.actions .slot-staff-active {
  border: 1px solid #86efac;
  background: #f0fdf4;
}
td.actions .slot-staff-blocked {
  border: 1px solid #fca5a5;
  background: #fef2f2;
}
td.actions .slot-staff-inactive {
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
}
td.actions .slot-staff-stale {
  border: 1px solid #fcd34d;
  background: #fffbeb;
}
td.actions .slot-staff-status {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
td.actions .slot-staff-active .slot-staff-status {
  color: #166534;
}
td.actions .slot-staff-blocked .slot-staff-status {
  color: #991b1b;
}
td.actions .slot-staff-inactive .slot-staff-status {
  color: #475569;
}
td.actions .slot-staff-stale .slot-staff-status {
  color: #92400e;
}
td.actions .slot-staff button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
td.pac {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}
.err {
  color: #a00;
  margin-top: 1rem;
}
.warn {
  color: #8a5a00;
  margin-top: 0.75rem;
}
.slot {
  border-top: 1px solid #ddd;
  margin-top: 1rem;
  padding-top: 0.75rem;
}
/* «Этот браузер» (cookie) — нейтральный акцент; зелёный только = device bind */
.slot.slot-current {
  border: 2px solid #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
}
.slot.slot-active {
  border: 2px solid #16a34a;
  border-radius: 6px;
  background: #f0fdf4;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
}
.slot.slot-active.slot-current {
  border-color: #16a34a;
  background: #f0fdf4;
}
.slot.slot-blocked {
  border: 2px solid #b91c1c;
  border-radius: 6px;
  background: #fef2f2;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
}
.slot.slot-inactive {
  border: 2px solid #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
}
.slot.slot-stale {
  border: 2px solid #d97706;
  border-radius: 6px;
  background: #fffbeb;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
}
.slot .slot-status {
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.slot.slot-active .slot-status { color: #166534; }
.slot.slot-blocked .slot-status { color: #991b1b; }
.slot.slot-inactive .slot-status { color: #475569; }
.slot.slot-stale .slot-status { color: #92400e; }
.slot form.inline { display: inline-block; margin-right: 0.5rem; margin-top: 0.35rem; }
button.btn-warn {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff;
}
.slot h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.muted {
  color: #666;
  font-weight: normal;
  font-size: 0.9rem;
}
code,
pre {
  background: #f4f4f4;
  padding: 0.15rem 0.35rem;
}
pre {
  padding: 0.75rem;
  overflow-x: auto;
}
.box {
  border: 1px solid #ccc;
  padding: 1rem;
  margin: 1rem 0;
}
h2 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
  text-align: left;
}
th.num,
td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
