/* net-K.pl / osTicket client theme. No JavaScript or external assets. */
:root {
  color-scheme: dark;
  --nk-bg: #0a0a0a;
  --nk-panel: #161616;
  --nk-field: #101010;
  --nk-border: #2e2e2e;
  --nk-text: #fafafa;
  --nk-muted: #bdbdbd;
  --nk-orange: #ff7400;
  --nk-hover: #ff8a24;
  --nk-focus: #b98a63;
  --nk-panel-min-height: 448px;
  
}
html { min-height: 100%; background: var(--nk-bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--nk-bg);
  color: var(--nk-text);
  font: 15px/1.65 "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body *, body *::before, body *::after { box-sizing: border-box; }
body a { color: var(--nk-orange); text-decoration: none; }
body a:hover { color: var(--nk-hover); text-decoration: underline; }
body a:focus-visible, body button:focus-visible, body input:focus-visible,
body select:focus-visible, body textarea:focus-visible {
  outline: 2px solid var(--nk-focus);
  outline-offset: 2px;
}
body ::selection { background: var(--nk-orange); color: #0b0b0b; }
body #container {
  flex: 1 0 auto;
  width: min(1230px, calc(100% - 64px));
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body #header {
  height: auto;
  min-height: 112px;
  padding: 25px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: transparent;
  border: 0;
}
body #header #logo {
  order: -1;
  float: none;
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: var(--nk-orange);
  font-size: 25px;
  font-weight: 750;
}
body #logo img { max-width: 240px; max-height: 64px; height: auto; object-fit: contain; }
body #logo .valign-helper { display: none; }
body #header .pull-right { float: none; text-align: right; color: var(--nk-muted); font-size: 13px; }
body #header p { margin: 3px 0; }
body #header p a:not(.flag) { font-weight: 650; }
body #header .flag { display: inline-block; margin-left: 8px; }
body .clear { clear: both; }
body #nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  height: auto;
  min-height: 68px;
  margin: 0;
  padding: 12px 0;
  list-style: none;
  background: transparent;
  border: 0;
  border-top: 1px solid #232323;
  border-bottom: 1px solid #232323;
}
body #nav li { float: none; margin: 0; padding: 0; background: none; border: 0; }
body #nav li a {
  display: block;
  height: auto;
  min-height: 46px;
  padding: 10px 20px;
  margin: 0;
  line-height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #d0d0d0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
/* Suppress legacy osTicket icon backgrounds, including class-specific rules. */
body #nav li a,
body #nav li a:hover,
body #nav li a.active {
  background-image: none !important;
  background-repeat: no-repeat;
}
body #nav li a:hover { background: #202020; color: #fff; }
body #nav li a.active { background: var(--nk-orange); color: #0b0b0b; }
body #content {
  width: 100%;
  max-width: none;
  min-height: 440px;
  padding: 48px 0 64px;
  margin: 0;
  background: transparent;
  border: 0;
  color: var(--nk-text);
}
body #landing_page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: 48px;
  row-gap: 28px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--nk-border);
  border-radius: 20px;
  background: linear-gradient(125deg, #1c1c1c 0%, #161616 55%, #111111 100%);
  box-shadow: 0 24px 70px #00000035;
}
body #landing_page > .main-content { display: contents; }
body #landing_page > .sidebar { grid-column: 2; grid-row: 2; align-self: center; min-width: 0; width: 100%; margin: 0; padding: 0; float: none; }
body #landing_page > .clear, body #landing_page > div:empty { display: none; }
body #landing_page .thread-body { display: contents; background: transparent; border: 0; padding: 0; margin: 0; color: #c5c5c5; font: inherit; }
body #landing_page .thread-body > * { min-width: 0; }
body #landing_page .thread-body > :not(h1):not(p:last-child) { grid-column: 1; }
body #content h1, body #content h2, body #content h3 { color: var(--nk-text); line-height: 1.2; letter-spacing: -.025em; }
body #landing_page h1 { grid-column: 1 / -1; grid-row: 1; margin: 0; padding-bottom: 24px; border-bottom: 1px solid var(--nk-border); font-size: clamp(30px, 3.4vw, 46px); font-weight: 750; }
/* The supplied heading has an inline black brand color. */
body #landing_page h1 span { color: var(--nk-orange) !important; }
body #landing_page .thread-body p { margin: 0; line-height: 2; }
body #content hr { height: 1px; border: 0; background: var(--nk-border); margin: 24px 0; }
body #landing_page .thread-body > hr { display: none; }
body #landing_page .thread-body p:last-child { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--nk-border); font-size: 14px; }
body #landing_page .thread-body p a { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
body #landing_page .front-page-button { float: none; width: 100%; margin: 0; }
body #landing_page .front-page-button p { margin: 0 0 14px; }
body #landing_page .front-page-button p:last-child { margin-bottom: 0; }
body #content .button, body #content button,
body #content input[type="submit"], body #content input[type="button"], body #content input[type="reset"] {
  display: inline-block;
  width: auto;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--nk-orange);
  border-radius: 10px;
  background: var(--nk-orange);
  color: #0b0b0b;
  box-shadow: none;
  text-shadow: none;
  font: 700 14px/1.5 "Segoe UI", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
body #content .button:hover, body #content button:hover,
body #content input[type="submit"]:hover, body #content input[type="button"]:hover { background: var(--nk-hover); border-color: var(--nk-hover); }
body #landing_page .front-page-button .button { display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 16px 18px; width: 100%; white-space: normal; }
body #content .button.green, body #content input[type="reset"] { background: #1b1b1b; color: var(--nk-orange); border-color: var(--nk-orange); }
body #content .button.green:hover, body #content input[type="reset"]:hover { background: #262626; color: var(--nk-hover); border-color: var(--nk-hover); }
body #content input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body #content select, body #content textarea {
  max-width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: var(--nk-field);
  color: var(--nk-text);
  border: 1px solid #484848;
  border-radius: 7px;
  box-shadow: none;
  font: inherit;
}
body #content input[type="checkbox"], body #content input[type="radio"] { accent-color: var(--nk-orange); }
body #content input::placeholder, body #content textarea::placeholder { color: #999; opacity: 1; }
body #content label, body #content legend { color: #e5e5e5; }
body #content fieldset { min-width: 0; border: 1px solid var(--nk-border); border-radius: 12px; padding: 24px; }
body #content table { max-width: 100%; border-color: var(--nk-border); color: var(--nk-text); }
body #content table th, body #content table td { border-color: var(--nk-border); }
body #content table th, body #content table thead td { background: #222222; color: #fafafa; padding: 12px; }
body #content table tbody td { background-color: var(--nk-panel); padding: 10px; }
body #content .thread-entry { border-color: #404040; border-radius: 10px; overflow: hidden; }
body #content .thread-entry .header { background: #242424; color: #eee; border-color: #404040; }
body #content .thread-entry .thread-body { background: var(--nk-panel); color: #ddd; }
body #content .redactor-box, body #content .redactor-toolbar { background: #242424; border-color: #484848; }
body #content .redactor-editor { background: var(--nk-field); color: var(--nk-text); }
body #content .redactor-toolbar a { color: #eee; }
body #content .select2-container .select2-selection { background: var(--nk-field); border-color: #484848; min-height: 42px; }
body #content .select2-selection .select2-selection__rendered { color: var(--nk-text); }
body .select2-dropdown, body .ui-datepicker { background: #202020; color: var(--nk-text); border-color: #484848; }
body #content .error, body #content .required { color: #ff9d8c; }
body #content #msg_error { background: #351b1b; color: #ffc2b8; border: 1px solid #83463e; border-radius: 8px; padding: 14px; }
body #content #msg_notice { background: #182d22; color: #b2e2c4; border: 1px solid #365b46; border-radius: 8px; padding: 14px; }
body #content #msg_warning { background: #352b18; color: #f4d69d; border: 1px solid #735d32; border-radius: 8px; padding: 14px; }
body #footer {
  flex-shrink: 0;
  width: min(1230px, calc(100% - 64px));
  margin: 0 auto;
  padding: 25px 0 36px;
  background: transparent;
  border-top: 1px solid #282828;
  color: #999;
  text-align: center;
  font-size: 12px;
}
body #footer p { margin: 0 0 6px; }
body #footer #poweredBy { display: inline; background: none; width: auto; height: auto; color: #aaa; font-size: 12px; }
/* Temporarily hide the loading message, including when scripts show it. */
body #loading { display: none !important; }
@media (max-width: 1000px) {
  body #landing_page { grid-template-columns: minmax(0, 1fr); padding: 32px; gap: 28px; }
  body #landing_page > .main-content { display: block; grid-column: 1; grid-row: 1; }
  body #landing_page .thread-body { display: block; }
  body #landing_page .thread-body p { margin-top: 24px; }
  body #landing_page > .sidebar { grid-column: 1; grid-row: 2; }
  body #landing_page .front-page-button { display: flex; gap: 14px; }
  body #landing_page .front-page-button p { flex: 1; margin: 0; }
}
@media (max-width: 600px) {
  body #container, body #footer { width: calc(100% - 32px); }
  body #header { min-height: 96px; gap: 12px; padding: 20px 0; }
  body #logo img { max-width: 150px; max-height: 48px; }
  body #header .pull-right { font-size: 11px; }
  body #nav { gap: 5px; }
  body #nav li { width: 100%; }
  body #nav li a { padding: 9px 14px; }
  body #content { padding: 24px 0 36px; }
  body #landing_page { padding: 25px 20px; border-radius: 14px; }
  body #landing_page h1 { font-size: 30px; overflow-wrap: anywhere; }
  body #landing_page .thread-body p { font-size: 14px; line-height: 1.85; }
  body #landing_page .front-page-button { display: block; }
  body #landing_page .front-page-button p + p { margin-top: 12px; }
  body #content fieldset { padding: 16px; }
}
/* New ticket form: preserve the original table, fields and AJAX hooks. */
body #content:has(> #ticketForm) { margin-inline: auto; padding-top: 16px; padding-bottom: 18px; }
body #content > h1 { margin: 0 0 6px; font-size: clamp(26px, 2.5vw, 34px); font-weight: 750; }
body #content > h1 + p { margin: 0 0 18px; color: var(--nk-muted); }
/* One continuous panel around the existing heading, intro and form. */
body #content:has(> #ticketForm) > h1 {
  margin: 0;
  padding: 18px 28px 6px;
  border: 1px solid var(--nk-border);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #1c1c1c;
}
body #content:has(> #ticketForm) > h1 + p,
body #content:has(> #ticketForm) > h2 {
  margin: 0;
  padding: 0 28px 10px;
  border-inline: 1px solid var(--nk-border);
  background: #1c1c1c;
}
body #content:has(> h1) > #ticketForm {
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(160deg, #1c1c1c, #161616 55%, #111111);
}
body #content #ticketForm {
  width: 100%;
  margin: 0;
  padding: 12px 28px 18px;
  border: 1px solid var(--nk-border);
  border-radius: 18px;
  background: linear-gradient(125deg, #1c1c1c 0%, #161616 55%, #111111 100%);
  box-shadow: 0 24px 70px #00000035;
}
body #content #ticketForm > table { width: 100%; border-collapse: collapse; table-layout: fixed; }
body #content #ticketForm table tbody td { background: transparent; padding: 6px 0; vertical-align: top; overflow-wrap: anywhere; }
body #content #ticketForm > table > tbody:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 2px;
}
body #content #ticketForm > table > tbody:first-child > tr { display: block; min-width: 0; }
body #content #ticketForm > table > tbody:first-child > tr:first-child { grid-column: 1 / -1; }
body #content #ticketForm > table > tbody:first-child > tr:nth-child(3) { grid-column: 1; grid-row: 2; }
body #content #ticketForm > table > tbody:first-child > tr:nth-child(2) { grid-column: 1; grid-row: 3; }
body #content #ticketForm > table > tbody:first-child > tr:nth-child(4) { grid-column: 2; grid-row: 2; }
body #content #ticketForm > table > tbody:first-child > tr > td { display: block; width: 100%; padding-top: 4px !important; }
body #content #ticketForm > table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  align-items: start;
}
body #content #ticketForm > table > tbody:first-child { grid-column: 1 / -1; grid-row: 1; }
body #content #ticketForm > table > tbody:nth-child(2) { grid-column: 1; grid-row: 2; }
body #content #ticketForm > table > tbody:has(> .captchaRow) { grid-column: 2; grid-row: 2; }
body #content #ticketForm > table > #dynamic-form { grid-column: 1 / -1; grid-row: 3; }
body #content #ticketForm > table > #dynamic-form:empty { display: none; }
body #content #ticketForm > table > tbody:not(:first-child) { display: table; width: 100%; }
body #content #ticketForm > table > tbody:nth-child(2) > tr:first-child hr { display: none; }
body #content #ticketForm .form-header { padding: 0 0 0 12px; background: transparent; border: 0; border-left: 3px solid var(--nk-orange); color: var(--nk-text); }
body #content #ticketForm .form-header h3,
body #content #ticketForm .form-header b { display: block; margin: 0; color: var(--nk-text); font-size: 17px; font-weight: 650; line-height: 1.4; }
body #content #ticketForm hr { margin: 16px 0; }
body #content #ticketForm > hr { display: none; }
body #content #ticketForm > table > tbody:has(> .captchaRow) > tr:not(.captchaRow):not(:has(input, select, textarea, button, .error)) { display: none; }
body #content #ticketForm > table > tbody:first-child > tr:first-child > td > hr { display: none; }
body #content #ticketForm label { display: block; font-size: 14px; font-weight: 600; }
body #content #ticketForm .required { color: #e5e5e5; }
body #content #ticketForm .error { color: #ff9d8c; }
body #content #ticketForm input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]),
body #content #ticketForm select, body #content #ticketForm textarea {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 12px;
  border-color: #414141;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 400;
}
/* Override the generic input rule's chained :not() specificity. */
body #content #ticketForm input:is([type="text"], [type="email"]):not([name$="-ext"]):not(#captcha) {
  width: 85% !important;
}
body #content #ticketForm input[type="tel"] { width: calc(100% - 112px) !important; }
body #content #ticketForm input[name$="-ext"] { width: 60px !important; }
body #content #ticketForm select { margin-top: 0; cursor: pointer; }
body #content #ticketForm select#topicId { width: calc(100% - 20px); max-width: 100%; }
body #content #ticketForm textarea { width: 100%; min-height: 120px; resize: vertical; }
body #content #ticketForm #dynamic-form .redactor-box { margin-top: 8px; border-radius: 8px; overflow: hidden; }
/* Support both legacy and current Redactor editor class names. */
body #content #ticketForm .redactor-editor,
body #content #ticketForm .redactor-in {
  background: var(--nk-field) !important;
  color: var(--nk-text) !important;
  caret-color: var(--nk-text);
  min-height: 160px;
}
body #content #ticketForm .redactor-editor::before,
body #content #ticketForm .redactor-in::before,
body #content #ticketForm .redactor-placeholder::before {
  color: #bdbdbd !important;
  opacity: 1 !important;
}
body #content #ticketForm .redactor-toolbar {
  background: #242424 !important;
  border-color: #484848;
  box-shadow: none;
}
body #content #ticketForm .redactor-toolbar li { background: transparent !important; }
body #content #ticketForm .redactor-toolbar a {
  background: transparent !important;
  color: #eee !important;
}
body #content #ticketForm .redactor-toolbar a:hover,
body #content #ticketForm .redactor-toolbar a:focus,
body #content #ticketForm .redactor-toolbar a.redactor-act {
  background: #3a3a3a !important;
  color: var(--nk-orange) !important;
}
body #content #ticketForm .captchaRow { display: block; width: 100%; max-width: 100%; margin-top: 0; padding: 6px 0; background: transparent; border: 0; }
body #content #ticketForm .captchaRow > td { display: block; padding: 0; vertical-align: middle; }
body #content #ticketForm .captchaRow > td:first-child { width: auto; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
body #content #ticketForm .captchaRow > td + td {
  display: grid;
  grid-template-columns: max-content minmax(0, 112px) 12px;
  align-items: center;
  gap: 8px;
  font-size: 0;
}
body #content #ticketForm .captchaRow .captcha { grid-column: 1; grid-row: 1; }
body #content #ticketForm .captchaRow input#captcha { grid-column: 2; grid-row: 1; max-width: 100%; }
body #content #ticketForm .captchaRow > td > .error {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}
body #content #ticketForm .captcha { display: inline-block; vertical-align: middle; }
body #content #ticketForm .captcha img { float: none; display: block; max-width: 100%; border-radius: 5px; }
body #content #ticketForm input#captcha { width: 112px !important; margin: 0; vertical-align: middle; }
body #content #ticketForm .captchaRow em { display: block; grid-column: 1 / -1; grid-row: 2; margin: 2px 0 0; color: var(--nk-muted); font-size: 12px; line-height: 1.5; font-style: normal; }
body #content #ticketForm select#topicId + .error { display: inline-block; white-space: nowrap; vertical-align: middle; }
/* Match the topic and CAPTCHA label rows, then align their controls. */
@media (min-width: 601px) {
  body #content #ticketForm > table > tbody:has(> .captchaRow) { width: min(100%, 300px); justify-self: end; padding-left: 0; }
  body #content #ticketForm > table > tbody:nth-child(2) > tr:first-child > td { padding: 6px 0 12px; }
  body #content #ticketForm > table > tbody:nth-child(2) .form-header { margin-bottom: 0 !important; }
  body #content #ticketForm > table > tbody:nth-child(2) .form-header b { line-height: 24px; }
  body #content #ticketForm > table > tbody:nth-child(2) > tr:nth-child(2) > td { padding-top: 0; }
  body #content #ticketForm .captchaRow > td:first-child { line-height: 24px; margin-bottom: 12px; }
  body #content #ticketForm .captchaRow > td + td { align-items: center; }
  body #content #ticketForm .captcha img { max-height: 42px; width: auto; }
}
body #content #ticketForm .buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; padding: 0; }
body #content #ticketForm .buttons input { margin: 0; min-height: 42px; padding: 9px 20px; }
body #content #ticketForm .buttons input[type="submit"] { order: 1; min-width: 200px; margin-left: auto; color: #0b0b0b !important; }
body #content #ticketForm .buttons input[type="reset"] { background: transparent; border-color: #484848; color: #bdbdbd; }
body #content #ticketForm .buttons input[type="reset"]:hover { background: #252525; border-color: #777; color: #fff; }
body #content #ticketForm input[name="cancel"] { background: transparent; border-color: #484848; color: #bdbdbd; }
body #content #ticketForm input[name="cancel"]:hover { background: #252525; border-color: #777; color: #fff; }
@media (min-width: 601px) and (max-width: 960px) {
  body #content #ticketForm > table > tbody:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body #content:has(> #ticketForm) > h1 { padding: 20px 18px 8px; border-radius: 14px 14px 0 0; }
  body #content:has(> #ticketForm) > h1 + p,
  body #content:has(> #ticketForm) > h2 { padding: 0 18px 16px; }
  body #content:has(> h1) > #ticketForm { border-radius: 0 0 14px 14px; }
  body #content #ticketForm > table > tbody:first-child { grid-template-columns: minmax(0, 1fr); }
  body #content #ticketForm > table > tbody:first-child > tr:nth-child(4) { grid-column: 1; grid-row: 4; }
  body #content #ticketForm select#topicId { width: calc(100% - 20px); }
  body #content #ticketForm > table > tbody:not(:first-child) { display: block; }
  body #content #ticketForm { padding: 22px 18px; border-radius: 14px; }
  body #content #ticketForm > table,
  body #content #ticketForm > table > tbody,
  body #content #ticketForm > table > tbody > tr,
  body #content #ticketForm > table > tbody > tr > td { display: block; width: 100%; }
  body #content #ticketForm .captchaRow > td + td { padding-top: 8px; }
  body #content #ticketForm .buttons { flex-direction: row; }
  body #content #ticketForm .buttons input { width: auto; padding-inline: 12px; }
  body #content #ticketForm .buttons input[type="submit"] { min-width: 0; }
  body #content #ticketForm input:is([type="text"], [type="email"]):not([name$="-ext"]):not(#captcha) { width: 100% !important; }
  body #content #ticketForm > table > tbody:nth-child(2),
  body #content #ticketForm > table > tbody:has(> .captchaRow) { margin-top: 16px; }
}
/* Account login: include templates that wrap the form in another element.
   The ticket-number form has its own layout below. */
body #content:has(#clientLogin):not(:has(#ticketno)) {
  --nk-login-padding: clamp(20px, 3.2vw, 40px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 500px;
  margin: 48px 0 64px;
  padding: 40px var(--nk-login-padding) 28px;
  border: 1px solid var(--nk-border);
  border-radius: 20px;
  background: linear-gradient(125deg, #1c1c1c, #161616 55%, #111111);
  box-shadow: 0 24px 70px #00000035;
}
body #content:has(#clientLogin):not(:has(#ticketno)) > h1 {
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
body #content:has(#clientLogin):not(:has(#ticketno)) > h1 + p {
  margin: 0;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--nk-border);
  background: transparent;
  color: var(--nk-muted);
  line-height: 1.7;
}
body #content #clientLogin:not(:has(#ticketno)) {
  display: flex;
  align-items: center;
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nk-text);
  box-shadow: none;
}
body #content #clientLogin:not(:has(#ticketno)) > div {
  display: grid !important;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  width: 100%;
  min-width: 0;
}
body #content #clientLogin:not(:has(#ticketno)) .login-box,
body #content #clientLogin:not(:has(#ticketno)) .instructions {
  display: block;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nk-text);
  box-shadow: none;
  overflow-wrap: anywhere;
}
body #content #clientLogin:not(:has(#ticketno)) .login-box > div { margin: 0 0 16px; }
body #content #clientLogin:not(:has(#ticketno)) .login-box > div:has(> strong:empty):not(:has(input, a)) { display: none; }
body #content #clientLogin:not(:has(#ticketno)) .login-box input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  margin: 0;
  font-size: 16px;
}
body #content #clientLogin:not(:has(#ticketno)) .login-box > p { margin: 20px 0 0; }
body #content #clientLogin:not(:has(#ticketno)) input[type="submit"] {
  color: #0b0b0b !important;
  white-space: normal;
}
body #content #clientLogin:not(:has(#ticketno)) .instructions {
  padding: 24px 28px;
  border: 1px solid var(--nk-border);
  border-left: 2px solid var(--nk-focus);
  border-radius: 12px;
  background: #141414;
  color: var(--nk-muted);
  line-height: 1.9;
}
body #content #clientLogin:not(:has(#ticketno)) .instructions p { margin: 0 0 12px; }
body #content #clientLogin:not(:has(#ticketno)) .instructions p:last-child { margin-bottom: 0; }
body #content #clientLogin:not(:has(#ticketno)) .instructions a { font-weight: 600; white-space: normal; text-underline-offset: 3px; }
body #content #clientLogin:not(:has(#ticketno)) + br { display: none; }
body #content #clientLogin:not(:has(#ticketno)):has(~ p) { border-bottom: 0; border-radius: 0; }
body #content #clientLogin:not(:has(#ticketno)) ~ p {
  margin: 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid #353535;
  border-radius: 0;
  background: transparent;
  color: var(--nk-muted);
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  body #content:has(#clientLogin):not(:has(#ticketno)) { min-height: 0; margin: 24px 0 36px; padding-block: 28px; }
  body #content #clientLogin:not(:has(#ticketno)) { padding-bottom: 24px; }
  body #content #clientLogin:not(:has(#ticketno)) > div { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body #content #clientLogin:not(:has(#ticketno)) .instructions { padding: 18px 20px; }
}
/* Registration uses an action URL rather than a form id in osTicket. */
body #content:has(form[action="account.php"] input[name="do"]:is([value="create"], [value="import"])) {
  margin: 48px 0 64px;
  padding: 40px clamp(20px, 3.2vw, 40px) 28px;
  border: 1px solid var(--nk-border);
  border-radius: 20px;
  background: linear-gradient(125deg, #1c1c1c, #161616 55%, #111111);
  box-shadow: 0 24px 70px #00000035;
}
body #content form[action="account.php"] {
  min-width: 0;
  margin: 0;
}
body #content form[action="account.php"] > table {
  width: 100%;
  border-collapse: collapse;
}
body #content form[action="account.php"] table tbody td {
  background: transparent;
  overflow-wrap: anywhere;
}
/* Override legacy submit colors, including the registration button. */
body #content form[action="account.php"] input[type="submit"],
body #content form[action="account.php"] button[type="submit"] {
  color: #0b0b0b !important;
}
@media (max-width: 900px) {
  body #content:has(form[action="account.php"] input[name="do"]:is([value="create"], [value="import"])) {
    margin: 24px 0 36px;
    padding-block: 28px;
  }
}
@media (max-width: 600px) {
  body #content form[action="account.php"] > table,
  body #content form[action="account.php"] > table > tbody,
  body #content form[action="account.php"] > table > tbody > tr,
  body #content form[action="account.php"] > table > tbody > tr > td {
    display: block;
    width: 100%;
  }
}
/* Ticket access page: scoped to the supplied email + ticket number form. */
body #content:has(> #clientLogin #ticketno) {
  margin-inline: auto;
  padding: 28px 0 36px;
}
body #content:has(> #clientLogin #ticketno) > h1 {
  margin: 0;
  padding: 28px 32px 10px;
  border: 1px solid var(--nk-border);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #1c1c1c;
}
body #content:has(> #clientLogin #ticketno) > h1 + p {
  margin: 0;
  padding: 0 32px 24px;
  border-inline: 1px solid var(--nk-border);
  background: #1c1c1c;
  color: var(--nk-muted);
  font-size: 14px;
  line-height: 1.7;
}
body #content #clientLogin:has(#ticketno) {
  width: 100%;
  margin: 0;
  padding: 4px 32px 28px;
  border: 1px solid var(--nk-border);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(160deg, #1c1c1c, #161616 55%, #111111);
  box-shadow: 0 24px 70px #00000035;
}
/* Replace only the inline table-row layout, without changing markup. */
body #content #clientLogin:has(#ticketno) > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}
body #content #clientLogin:has(#ticketno) .login-box {
  display: block;
  float: none;
  width: auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body #content #clientLogin:has(#ticketno) .login-box > div { margin: 0 0 16px; padding: 0; }
body #content #clientLogin:has(#ticketno) .login-box > div:has(> strong:empty) { display: none; }
body #content #clientLogin:has(#ticketno) label { display: block; color: #e5e5e5; font-size: 14px; font-weight: 600; }
body #content #clientLogin:has(#ticketno) input:is(#email, #ticketno) {
  display: block;
  width: 100%;
  height: 44px;
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
}
body #content #clientLogin:has(#ticketno) .login-box > p { display: flex; justify-content: flex-end; margin: 20px 0 0; padding: 0; }
body #content #clientLogin:has(#ticketno) input[type="submit"] { width: 100%; min-height: 48px; margin: 0; border-radius: 8px; white-space: normal; }
body #content #clientLogin:has(#ticketno) .instructions {
  display: block;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--nk-border);
  border-left: 3px solid var(--nk-orange);
  border-radius: 10px;
  background: #121212;
  color: var(--nk-muted);
  font-size: 14px;
  line-height: 1.9;
}
body #content #clientLogin:has(#ticketno) .instructions {
  font-size: 14px;
  line-height: 1.85;
  text-wrap: pretty;
  color: #cecece;
  text-align: center;
  align-content: center;
  line-height: 1.7;
}
body #content #clientLogin:has(#ticketno) .instructions a {
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
body #content #clientLogin:has(#ticketno) .instructions a:first-of-type::before {
  content: "";
  display: block;
  margin-top: 4px;
}
body #content #clientLogin:has(#ticketno) .instructions a:hover { text-decoration: none; }
@media (min-width: 701px) {
  body #content #clientLogin:has(#ticketno) > div {
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    row-gap: 16px;
    align-items: stretch;
  }
  body #content #clientLogin:has(#ticketno) .login-box { display: contents; }
  body #content #clientLogin:has(#ticketno) .login-box > div { grid-column: 1; margin: 0; }
  body #content #clientLogin:has(#ticketno) .login-box > div:has(#email) { grid-row: 1; }
  body #content #clientLogin:has(#ticketno) .login-box > div:has(#ticketno) { grid-row: 2; }
  body #content #clientLogin:has(#ticketno) .login-box > p { grid-column: 1; grid-row: 3; margin: 4px 0 0; }
  body #content #clientLogin:has(#ticketno) .instructions {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: stretch;
    align-content: center;
    padding: 20px 30px;
  }
}
body #content #clientLogin:has(#ticketno) + br { display: none; }
body #content #clientLogin:has(#ticketno) {
  border-bottom: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #1c1c1c, #161616);
  box-shadow: none;
}
body #content #clientLogin:has(#ticketno) ~ p {
  margin: 0;
  padding: 18px 32px 22px;
  border: 1px solid var(--nk-border);
  border-top-color: #303030;
  border-radius: 0 0 18px 18px;
  background: #161616;
  color: var(--nk-muted);
  font-size: 13px;
  line-height: 1.8;
}
@media (max-width: 700px) {
  body #content:has(> #clientLogin #ticketno) > h1 { padding: 22px 20px 10px; }
  body #content:has(> #clientLogin #ticketno) > h1 + p { padding: 0 20px 20px; }
  body #content #clientLogin:has(#ticketno) { padding: 0 20px 22px; }
  body #content #clientLogin:has(#ticketno) > div { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body #content #clientLogin:has(#ticketno) input[type="submit"] { width: 100%; }
  body #content #clientLogin:has(#ticketno) .instructions { padding: 16px; }
  body #content #clientLogin:has(#ticketno) ~ p { padding: 16px 20px 20px; }
}
/* One focus border for fields, without a second outline or legacy glow. */
body #content input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
body #content select:focus,
body #content textarea:focus,
body #content .select2-container--focus .select2-selection,
body #content .select2-container--open .select2-selection,
body #content .select2-selection:focus,
body #content .redactor-box:focus-within {
  border-color: var(--nk-focus) !important;
  outline: none !important;
  box-shadow: none !important;
}
/* The editor's outer box carries its focus indicator. */
body #content .redactor-box .redactor-editor:focus,
body #content .redactor-box .redactor-in:focus {
  outline: none !important;
  box-shadow: none !important;
}
@media (forced-colors: active) {
  body #content input:focus-visible,
  body #content select:focus-visible,
  body #content textarea:focus-visible,
  body #content .select2-selection:focus-visible,
  body #content .redactor-box:focus-within {
    outline: 2px solid Highlight !important;
    outline-offset: 2px;
  }
}
/* Match panel heights on desktop; longer forms can grow with their content. */
@media (min-width: 701px) {
  body #landing_page {
    min-height: var(--nk-panel-min-height);
  }
  /* These panels include the heading and introduction outside the form. */
  body #content:has(> #ticketForm),
  body #content:has(> #clientLogin #ticketno) {
    display: flex;
    flex-direction: column;
    box-sizing: content-box;
    min-height: var(--nk-panel-min-height);
  }
  body #content > #ticketForm,
  body #content > #clientLogin:has(#ticketno) {
    flex: 1 0 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  body #content .button, body #content button, body #content input { transition: none; }
}
