/* Private Keyserver chrome, matching the CV7 Intradyn logo and palette. */
#container.private-interface {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.private-interface #header {
  box-sizing: border-box;
  width: 100%;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 30px;
  background: #fff;
  color: #15406d;
  border-bottom: 4px solid #2B566A;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.private-interface .breadcrumbs {
  padding-left: 30px;
  padding-right: 30px;
  padding-bottom: 7px;
  text-align: right;
  background: #2B566A;
  border: 0;
  color: #fff;
}

.private-interface .breadcrumbs a:link,
.private-interface .breadcrumbs a:visited {
  color: #fff;
}

.private-interface .breadcrumbs a:hover,
.private-interface .breadcrumbs a:focus-visible {
  background: transparent;
  color: #fff;
  text-decoration: underline;
}

.private-interface #branding {
  float: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 26px;
  min-width: 0;
}

.private-interface .brand-home {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.private-interface .brand-home img {
  display: block;
  border: 0;
  max-width: 100%;
  height: auto;
}

.private-interface #site-name {
  margin: 0;
  padding: 8px 0 8px 26px;
  border-left: 1px solid #dce3e8;
  color: #555;
  font-size: 20px;
  font-weight: normal;
  line-height: 1.35;
}

.private-interface #user-tools {
  position: static;
  float: none;
  margin: 0;
  margin-left: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: #555;
  font-size: 12px;
  text-align: left;
}

.private-interface #header a:link,
.private-interface #header a:visited {
  color: #38748E;
}

.private-interface #header a:hover {
  background: transparent;
  color: #38748E;
  text-decoration: underline;
}

.private-interface #header a:focus-visible {
  outline: 2px solid #1297d1;
  outline-offset: 4px;
}

.private-interface #user-tools .logout-link {
  padding: 7px 12px;
  border: 1px solid #d0dce5;
  border-radius: 4px;
}

.private-interface #content {
  box-sizing: border-box;
  width: 100%;
  flex: 1 0 auto;
}

.private-interface #footer {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  padding: 18px 30px;
  border: 0;
  background: #f5f7f8;
  color: #555;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.private-interface #footer p {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.private-interface .footer-product span {
  margin: 0 8px;
}

@media (max-width: 600px) {
  .private-interface #header { padding: 20px 16px; }
  .private-interface .breadcrumbs { padding-left: 16px; padding-right: 16px; }
  .private-interface #branding { align-items: flex-start; flex-direction: column; }
  .private-interface #site-name { padding: 0; border-left: 0; font-size: 18px; }
  .private-interface #footer { padding-right: 16px; padding-left: 16px; }
}

/* Home-only styling: retain the existing form, permissions, and button actions. */
.private-interface:has(form[name="keyentryform"]) {
  background: #f5f7f8;
}

.private-interface #content:has(form[name="keyentryform"]) {
  max-width: 1180px;
  padding: 32px 30px 40px;
  color: #35434b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.private-interface #content:has(form[name="keyentryform"]) > p:first-of-type {
  margin: 0 0 24px;
  padding: 0;
  color: #67757d;
  font-size: 13px;
}

.private-interface #content:has(form[name="keyentryform"]) > h2 {
  margin: 0 0 22px;
  padding: 0;
  color: #2b566a;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
}

.private-interface #content:has(form[name="keyentryform"]) > .nested {
  display: block;
  padding: 0;
}

.private-interface form[name="keyentryform"] {
  margin: 0 0 28px;
  padding: 28px;
  border: 1px solid #dce4e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(43, 86, 106, .04);
}

.private-interface form[name="keyentryform"] table.inputs {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  align-items: center;
  gap: 12px 20px;
  width: 100%;
  margin: 0;
}

.private-interface form[name="keyentryform"] table.inputs tbody,
.private-interface form[name="keyentryform"] table.inputs tr {
  display: contents;
}

.private-interface form[name="keyentryform"] table.inputs td {
  padding: 0;
  border: 0;
  min-width: 0;
  white-space: normal;
  font-size: 14px;
  line-height: 1.5;
}

.private-interface form[name="keyentryform"] table.inputs .field_label {
  text-align: left;
  font-weight: 500;
}

/* Drop only the legacy layout's spacer cells, preserving fields and errors. */
.private-interface form[name="keyentryform"] td:not(.field_label):not(:has(input, select, textarea, ul)) {
  display: none;
}

.private-interface form[name="keyentryform"] .help_text {
  display: block;
  margin-top: 5px;
  color: #71808a;
  font-family: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: normal;
  overflow-wrap: anywhere;
}

.private-interface form[name="keyentryform"] .field_label br {
  display: none;
}

.private-interface form[name="keyentryform"] #morecriteria {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8edf0;
}

.private-interface form[name="keyentryform"] input:not([type="submit"]):not([type="hidden"]),
.private-interface form[name="keyentryform"] select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #bdcbd3;
  border-radius: 6px;
  background: #fff;
  color: #35434b;
  font: inherit;
}

.private-interface form[name="keyentryform"] td:has(input[type="submit"]) {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 8px;
}

.private-interface #content:has(form[name="keyentryform"]) input[type="button"],
.private-interface form[name="keyentryform"] input[type="submit"] {
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid #cad8df;
  border-radius: 6px;
  background: #fff;
  color: #38748e;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.private-interface form[name="keyentryform"] input[type="submit"] {
  min-width: 120px;
  border-color: #2b566a;
  background: #2b566a;
  color: #fff;
}

.private-interface #content:has(form[name="keyentryform"]) input[type="button"]:hover {
  border-color: #38748e;
  background: #edf4f7;
}

.private-interface form[name="keyentryform"] input[type="submit"]:hover {
  background: #38748e;
}

.private-interface #content:has(form[name="keyentryform"]) input:focus-visible,
.private-interface form[name="keyentryform"] select:focus-visible {
  outline: 2px solid #38748e;
  outline-offset: 3px;
}

.private-interface #content:has(form[name="keyentryform"]) :is(#listall, #navigation, #administration) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid #dce4e8;
  background: transparent;
}

.private-interface #content:has(form[name="keyentryform"]) :is(#listall, #navigation, #administration):not(:has(input)) {
  display: none;
}

@media (max-width: 900px) {
  .private-interface #content:has(form[name="keyentryform"]) :is(#listall, #navigation, #administration) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .private-interface #content:has(form[name="keyentryform"]) { padding: 24px 16px; }
  .private-interface #content:has(form[name="keyentryform"]) > h2 { font-size: 20px; }
  .private-interface form[name="keyentryform"] { padding: 20px 16px; }
  .private-interface form[name="keyentryform"] table.inputs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .private-interface form[name="keyentryform"] .field_label { margin-top: 8px; }
  .private-interface #content:has(form[name="keyentryform"]) :is(#listall, #navigation, #administration) { grid-template-columns: minmax(0, 1fr); }
}
