/* biz-eu.net skin for the osTicket client portal.
   Loaded after the stock stylesheets from include/client/header.inc.php.
   Tokens match the biz-eu.net landing page (assets/css/style.css there). */

@font-face { font-family: "Geist"; src: url("fonts/geist-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1F1F1F;
  --surface-3: #272727;
  --line: #313131;
  --text: #FFFFFF;
  --muted: #9B9B9B;
  --accent: #6EE7A1;
  --warn: #F5C46B;
  --danger: #FF8A8A;
  --r-card: 1.5rem;
  --r-field: .75rem;
  --r-sm: .5rem;
  --r-full: 9999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

/* base */
html, body { background: var(--bg) !important; }
body {
  margin: 0; color: var(--text);
  font-family: "Geist", system-ui, sans-serif; font-size: 1rem; line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
a, .link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: text-decoration-color 200ms var(--ease); }
a:hover, .link:hover { color: var(--text); text-decoration-color: var(--text); }
h1, h2, h3, .subject { color: var(--text); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.875rem; line-height: 2.25rem; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; line-height: 1.75rem; }
h3 { font-size: 1.0625rem; line-height: 1.5rem; }
hr { border: 0; border-top: 1px solid var(--surface-3); }
small, .faded, em { color: var(--muted); }
strong { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* frame */
#container {
  flex: 1; width: 100%; max-width: 60rem; margin: 0 auto; padding: 0 1rem;
  background: transparent; box-shadow: none; border: 0;
}
@media (min-width: 768px) { #container { padding: 0 2rem; } }

/* header: floating pill like the landing nav */
#header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  height: auto; margin: 1rem 0 0; padding: .5rem .5rem .5rem .75rem;
  background: rgb(24 24 24 / .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--surface-3); border-radius: var(--r-full);
}
#header .pull-right { float: none; order: 2; }
#header p { margin: 0; padding: 0; color: var(--muted); font-size: .875rem; line-height: 1.25rem; }
#header p:empty { display: none; }
#header p a { color: var(--text); text-decoration: none; }
#header p a:hover { text-decoration: underline; }
#logo.bz-logo {
  float: none; order: 1; height: auto; width: auto; max-width: none;
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--text); font-weight: 600; text-decoration: none;
}
#logo.bz-logo svg { width: 1.75rem; height: 1.75rem; flex: none; }
#logo.bz-logo span span { color: var(--muted); font-weight: 400; }

/* nav: tabs under the header */
#nav {
  display: flex; flex-wrap: wrap; gap: .25rem; margin: 1.5rem 0 0; padding: 0;
  background: transparent; border: 0; box-shadow: none; height: auto;
}
#nav li { margin: 0; display: block; }
#nav li a, .rtl #nav li a {
  display: inline-flex; align-items: center; height: auto; width: auto;
  padding: .5rem 1rem; border-radius: var(--r-full);
  background: none !important; color: var(--muted); text-decoration: none;
  font-size: .875rem; line-height: 1.25rem; border: 1px solid transparent;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
#nav li a:hover { color: var(--text); background: none; }
#nav li a.active { color: var(--text); background: var(--surface) !important; border-color: var(--surface-3); }

/* content card */
#content {
  margin: 1.5rem 0 3rem; padding: 2rem 1.25rem;
  background: var(--surface); border: 1px solid var(--surface-3); border-radius: var(--r-card);
  color: var(--text);
}
@media (min-width: 768px) { #content { padding: 2.5rem; } }
#content > hr:first-child { display: none; }
.clear { clear: both; }

/* landing page: text left, buttons right */
#landing_page { display: grid; gap: 2rem; }
#landing_page .sidebar { float: none; width: auto; order: 2; }
#landing_page .main-content { width: auto; float: none; }
#landing_page h1 {
  background: linear-gradient(90deg, #FFFFFF, #9B9B9B);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#landing_page p { color: var(--muted); max-width: 40rem; }
.front-page-button { width: auto; }
.front-page-button p { margin: 0 0 .75rem; }
@media (min-width: 900px) {
  #landing_page { grid-template-columns: 1fr 15rem; align-items: start; }
  #landing_page .sidebar { order: 2; }
  #landing_page .main-content { order: 1; }
}

/* buttons */
.button, input[type="submit"], input[type="button"], input[type="reset"], button,
#clientLogin input[type=submit], #kb-search #searchSubmit {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: auto; width: auto; min-height: 2.5rem; padding: .5rem 1.25rem; margin: 0;
  background: var(--surface-3); color: var(--text) !important; background-image: none;
  border: 1px solid var(--line); border-radius: var(--r-full); box-shadow: none; text-shadow: none;
  font-family: inherit; font-size: .9375rem; line-height: 1.5rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color 240ms var(--ease), transform 240ms var(--ease), border-color 240ms var(--ease);
}
.button:hover, input[type="submit"]:hover, input[type="button"]:hover, input[type="reset"]:hover, button:hover {
  background: #313131; border-color: #3d3d3d; transform: translateY(-1px);
}
.button:active, input[type="submit"]:active, button:active { transform: scale(.98); }
/* primary actions: white pill as on the landing */
.blue.button, .blue.button:visited, input[type="submit"], #clientLogin input[type=submit] {
  background: var(--text); color: var(--bg) !important; border-color: var(--text);
}
.blue.button:hover, input[type="submit"]:hover { background: #D9D9D9; border-color: #D9D9D9; }
.green.button, .green.button:visited { background: transparent; color: var(--text) !important; border-color: var(--line); }
.green.button:hover { background: var(--surface-3); }
.front-page-button .button { width: 100%; }

/* form fields */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"],
input[type="search"], input[type="url"], input:not([type]), textarea, select,
#clientLogin div select, #clientLogin div textarea, #reply textarea {
  width: 100%; max-width: 100%; box-sizing: border-box;
  min-height: 2.75rem; padding: .625rem .875rem; margin: 0;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-field); box-shadow: none;
  font-family: inherit; font-size: 1rem; line-height: 1.5rem;
  transition: border-color 200ms var(--ease);
}
textarea { min-height: 8rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #6b6b6b; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: auto; min-height: 0; }
input[type="tel"] + input[type="text"] { width: 6rem; margin-top: .5rem; }
select option { background: var(--surface); color: var(--text); }
label { color: var(--text); font-weight: 500; }
label.required, span.required, .required { color: var(--text); }
span.error, .error, font.error, div.error, label .error { color: var(--danger) !important; }
.error input, .error textarea, #clientLogin div.error input { border-color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; }

/* new ticket form: stacked labels instead of the two-column table */
#ticketForm > table, #ticketForm table, #clientLogin table { width: 100% !important; border-collapse: collapse; }
#ticketForm table td, #ticketForm table th { display: block; width: auto !important; padding: 0 0 .5rem; border: 0; background: none; color: var(--text); text-align: left; }
#ticketForm table tr { display: block; margin-bottom: .75rem; }
#ticketForm table td + td { padding-left: 0; }
#ticketForm hr { margin: 1.5rem 0; }
.form-header, #ticketForm .form-header h3 { color: var(--text); }
.form-header em, #ticketForm em, .instructions { color: var(--muted); font-style: normal; }
#ticketForm .buttons, #ticketForm p.buttons, p.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.captchaRow img, #ticketForm img[src*="captcha"] { border-radius: var(--r-sm); background: #fff; vertical-align: middle; }

/* rich text editor (Redactor) */
.redactor-box, .redactor-box.redactor-styles-on { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-field); overflow: hidden; }
.redactor-box:focus-within { border-color: var(--accent); }
.redactor-toolbar, .redactor-air { background: var(--surface-2) !important; border-bottom: 1px solid var(--line); box-shadow: none !important; }
.redactor-toolbar a, .redactor-air a { color: var(--muted) !important; background: transparent !important; }
.redactor-toolbar a:hover, .redactor-toolbar a.redactor-button-active { color: var(--text) !important; background: var(--surface-3) !important; }
.redactor-styles, .redactor-in, .redactor-editor, .redactor-layer {
  background: var(--bg) !important; color: var(--text) !important; font-family: inherit !important; border: 0 !important;
}
.redactor-placeholder:before, .redactor-in.redactor-placeholder:before { color: #6b6b6b !important; }
.redactor-dropdown, .redactor-modal { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.redactor-dropdown a { color: var(--text) !important; }
.redactor-dropdown a:hover { background: var(--surface-3) !important; }

/* file uploads */
.filedrop { background: transparent; }
.filedrop .dropzone {
  background: var(--bg) !important; color: var(--muted) !important;
  border: 1px dashed var(--line) !important; border-radius: var(--r-field); padding: .75rem 1rem;
}
.filedrop .dropzone a { color: var(--text); }
.filedrop .files .file { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); }

/* select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-field); min-height: 2.75rem;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 2.75rem; padding-left: .875rem; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 2.75rem; }
.select2-dropdown { background: var(--surface); border-color: var(--line); color: var(--text); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--surface-3); color: var(--text); }
.select2-search__field { background: var(--bg); color: var(--text); }

/* sign in / check status */
#clientLogin {
  width: auto; max-width: none; margin: 0; padding: 0;
  background: none; border: 0; box-shadow: none; display: grid; gap: 2rem;
}
#clientLogin > div, #clientLogin .instructions { float: none !important; width: auto !important; padding: 0 !important; border: 0 !important; margin: 0 !important; }
#clientLogin p { color: var(--muted); }
#clientLogin strong { color: var(--text); }
#clientLogin input[type=text], #clientLogin input[type=password], #clientLogin input[type=email], #clientLogin #ticketno { width: 100%; }
#clientLogin div label { color: var(--text); }
@media (min-width: 768px) { #clientLogin { grid-template-columns: 1fr 1fr; } }

/* ticket list and ticket view */
table.list, #ticketTable, #ticketThread, .infoTable, .custom-data table {
  width: 100%; background: transparent; border-collapse: collapse; color: var(--text);
}
table.list th, #ticketTable th, .infoTable th, table th {
  background: transparent !important; color: var(--muted); font-weight: 500; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); padding: .625rem .5rem;
}
table.list td, #ticketTable td, .infoTable td, table td { border-color: var(--surface-3); color: var(--text); padding: .5rem; }
table.list tr:nth-child(even) td, #ticketTable tr:nth-child(even) td { background: rgb(255 255 255 / .02); }
table.list a, #ticketTable a { text-decoration: none; }
table.list a:hover, #ticketTable a:hover { text-decoration: underline; }
.thread-entry .header, .thread-entry .thread-body, .thread-body {
  background: transparent; color: var(--text); border-color: var(--line);
}
.thread-entry { border-color: var(--line) !important; border-radius: var(--r-field); overflow: hidden; }
.thread-entry .header { background: var(--surface-2) !important; color: var(--muted); }
.thread-entry.response .header { background: rgb(110 231 161 / .08) !important; }
.thread-event, .thread-event .description { color: var(--muted); }
.avatar { border-radius: 50%; }
#reply { background: transparent; border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* messages */
#msg_notice, #msg_warning, #msg_error, #msg_info, .warning-banner {
  margin: 0 0 1.5rem; padding: .75rem 1rem .75rem 1rem; background-image: none !important;
  border-radius: var(--r-field); border: 1px solid; font-size: .9375rem;
}
#msg_notice, #msg_info { background: rgb(110 231 161 / .08); border-color: rgb(110 231 161 / .35); color: var(--accent); }
#msg_warning, .warning-banner { background: rgb(245 196 107 / .08); border-color: rgb(245 196 107 / .35); color: var(--warn); }
#msg_error { background: rgb(255 138 138 / .08); border-color: rgb(255 138 138 / .35); color: var(--danger); }
.error_bar, .warning_bar, .notice_bar { background: var(--surface-2); color: var(--warn); border: 0; border-bottom: 1px solid var(--line); }

/* knowledge base and pagination */
#kb > li, .featured-category, #faq ol li { color: var(--text); }
#kb-search #query, #kb-search #cid, #kb-search #topic-id { background: var(--bg); color: var(--text); }
.article-teaser, .category-name + div { color: var(--muted); }
#pagination li a, #pagination .active { background: none; color: var(--text); border-color: var(--line); border-radius: var(--r-sm); }

/* jQuery UI dialogs and pickers */
.ui-widget-content, .ui-dialog, .ui-datepicker { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }
.ui-widget-header { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.ui-state-default, .ui-widget-content .ui-state-default { background: var(--surface-3) !important; color: var(--text) !important; border-color: var(--line) !important; }
.ui-state-active, .ui-widget-content .ui-state-active { background: var(--text) !important; color: var(--bg) !important; }
#overlay { background: rgb(0 0 0 / .7); }
#loading { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }
.dialog, .dialog .body { background: var(--surface); color: var(--text); border-color: var(--line); }

/* footer: same row as the landing */
#footer {
  width: 100%; max-width: none; margin: 0; padding: 1.5rem 0; text-align: left;
  border-top: 1px solid var(--surface-3); color: var(--muted); font-size: .875rem; line-height: 1.25rem;
}
#footer .bz-footer { max-width: 60rem; margin: 0 auto; padding: 0 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
@media (min-width: 768px) { #footer .bz-footer { padding: 0 2rem; } }
#footer p { margin: 0; padding: 0; color: var(--muted); }
#footer a { color: var(--muted); text-decoration: none; transition: color 200ms var(--ease); }
#footer a:hover { color: var(--text); }
#footer #poweredBy { display: inline; float: none; width: auto; height: auto; background: none; text-indent: 0; font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:hover, input[type="submit"]:hover, button:hover { transform: none; }
}

/* fixes for fixed pixel widths in the stock theme */
#header p { width: auto; max-width: 100%; text-align: right; }
.button, .button:visited { max-width: none; }
.main-content, .sidebar, #landing_page #check_status, #landing_page #new_ticket { width: auto !important; float: none; margin: 0; min-height: 0; }
#ticketForm > table td, #clientLogin div textarea, #reply textarea, #kb-search #query, #kb-search #cid, #kb-search #topic-id,
.thread-event .description, .search-form .search { width: auto !important; max-width: 100%; }
#footer #poweredBy { width: auto; }
.front-page-button .button, .front-page-button a.button[style] {
  display: flex !important; box-sizing: border-box; width: 100%; height: auto !important; line-height: 1.5rem;
  padding: .75rem 1.25rem; font-size: 1rem;
}
.sidebar .content:empty, #landing_page > div:empty { display: none; }
.thread-body, .thread-body * { font-family: inherit !important; }
#landing_page .thread-body p { color: var(--muted); font-size: 1.0625rem; line-height: 1.75rem; }
.filedrop .dropzone a, a.manual, .filedrop .dropzone .manual { color: var(--text) !important; }
#footer .bz-footer > * { flex: none; width: auto; margin: 0; }

/* check status / sign in: two columns, no table layout */
#clientLogin { display: block; }
#clientLogin > div[style*="table-row"] { display: grid !important; gap: 2rem; }
#clientLogin .login-box { display: grid; gap: 1rem; }
#clientLogin .login-box > div:first-child:empty, #clientLogin .login-box > div > strong:empty { display: none; }
#clientLogin label { display: grid; gap: .5rem; }
#clientLogin input[type=text], #clientLogin input[type=password], #clientLogin input[type=email], #clientLogin #ticketno, #clientLogin #email {
  width: 100%; min-height: 2.75rem; padding: .625rem .875rem;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-field); box-shadow: none;
}
#clientLogin input:focus { border-color: var(--accent); }
#clientLogin .instructions { color: var(--muted); padding: 1.25rem 1.5rem !important; border: 1px solid var(--surface-3) !important; border-radius: var(--r-field); background: var(--surface-2); align-self: start; }
#clientLogin p { margin: 0; }
@media (min-width: 768px) { #clientLogin > div[style*="table-row"] { grid-template-columns: 1fr 1fr; } }

/* small screens: header pill becomes a rounded card */
@media (max-width: 639px) {
  #header { border-radius: var(--r-card); padding: .75rem 1rem; }
  #header .pull-right { width: 100%; }
  #header p { text-align: left; }
  #nav li a { padding: .5rem .75rem; }
}
#container, #header, #content, #nav { box-sizing: border-box; }

/* landing grid: explicit placement (stock markup has extra empty divs) */
#landing_page > div:not(.sidebar):not(.main-content) { display: none; }
#landing_page h1 { margin-top: 0; }
@media (min-width: 900px) {
  #landing_page .main-content { grid-column: 1; grid-row: 1; }
  #landing_page .sidebar { grid-column: 2; grid-row: 1; }
}
#clientLogin .login-box { width: auto !important; max-width: none; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; float: none !important; }
#clientLogin .login-box label, #clientLogin .login-box > div { width: 100%; }
#footer .bz-footer { box-sizing: border-box; width: 100%; }
#footer #poweredBy { margin: 0 !important; position: static; }
