/*
 * modern.css — client portal theme overlay for osTicket 1.18
 * Loaded after the stock stylesheets by include/client/header.inc.php.
 * Light/dark tokens switch on html[data-theme]; originals of the edited
 * templates are in /opt/osticket/theme-backup.
 */

/* ---------- Tokens ---------- */
:root {
  --mx-bg: #f5f7fb;
  --mx-surface: #ffffff;
  --mx-surface-2: #f8fafc;
  --mx-surface-3: #eef2f7;
  --mx-border: #e3e8ef;
  --mx-border-strong: #cdd5df;
  --mx-text: #0f172a;
  --mx-text-2: #475569;
  --mx-text-3: #64748b;
  --mx-accent: #4f46e5;
  --mx-accent-hover: #4338ca;
  --mx-accent-soft: #eef2ff;
  --mx-accent-text: #ffffff;
  --mx-ring: rgba(79, 70, 229, .28);
  --mx-blue: #2563eb;   --mx-blue-soft: #dbeafe;
  --mx-violet: #7c3aed; --mx-violet-soft: #ede9fe;
  --mx-green: #059669;  --mx-green-soft: #d1fae5;
  --mx-amber: #b45309;  --mx-amber-soft: #fef3c7;
  --mx-red: #dc2626;    --mx-red-soft: #fee2e2;
  --mx-topbar: rgba(255, 255, 255, .82);
  --mx-hero-a: #4f46e5;
  --mx-hero-b: #0ea5e9;
  --mx-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --mx-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --mx-shadow-lg: 0 24px 48px -20px rgba(15, 23, 42, .25);
  --mx-radius: 14px;
  --mx-radius-sm: 9px;
  --mx-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --mx-bg: #0b0f19;
  --mx-surface: #121826;
  --mx-surface-2: #161d2e;
  --mx-surface-3: #1d2638;
  --mx-border: #243047;
  --mx-border-strong: #33415c;
  --mx-text: #e6eaf2;
  --mx-text-2: #a8b3c7;
  --mx-text-3: #8391a8;
  --mx-accent: #818cf8;
  --mx-accent-hover: #a5b4fc;
  --mx-accent-soft: rgba(129, 140, 248, .14);
  --mx-accent-text: #0b0f19;
  --mx-ring: rgba(129, 140, 248, .35);
  --mx-blue: #60a5fa;   --mx-blue-soft: rgba(96, 165, 250, .14);
  --mx-violet: #a78bfa; --mx-violet-soft: rgba(167, 139, 250, .14);
  --mx-green: #34d399;  --mx-green-soft: rgba(52, 211, 153, .14);
  --mx-amber: #fbbf24;  --mx-amber-soft: rgba(251, 191, 36, .13);
  --mx-red: #f87171;    --mx-red-soft: rgba(248, 113, 113, .14);
  --mx-topbar: rgba(13, 18, 30, .78);
  --mx-hero-a: #3730a3;
  --mx-hero-b: #0e7490;
  --mx-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --mx-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --mx-shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
html { background: var(--mx-bg); }
body.mx {
  background: var(--mx-bg);
  color: var(--mx-text);
  font-family: var(--mx-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.mx, body.mx input, body.mx select, body.mx textarea, body.mx button, body.mx table { font-family: var(--mx-font); }
body.mx a, body.mx .link { color: var(--mx-accent); text-decoration: none; }
body.mx a:hover, body.mx .link:hover { color: var(--mx-accent-hover); text-decoration: underline; text-underline-offset: 3px; }
body.mx h1, body.mx h2, body.mx h3, body.mx .subject {
  color: var(--mx-text);
  font-family: var(--mx-font);
  letter-spacing: -.015em;
  font-weight: 700;
}
body.mx h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
body.mx h2 { font-size: 18px; }
body.mx h3 { font-size: 16px; }
body.mx hr { border: 0; border-top: 1px solid var(--mx-border); height: 0; margin: 20px 0; background: none; }
body.mx ::selection { background: var(--mx-ring); }
body.mx :focus-visible { outline: 2px solid var(--mx-accent); outline-offset: 2px; }
.mx-ico { flex: none; vertical-align: middle; }

.mx-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mx-surface); padding: 8px 12px; border-radius: 8px; }
.mx-skip:focus { left: 12px; }

/* ---------- Layout ---------- */
body.mx #container {
  width: auto;
  max-width: none;
  margin: 0;
  background: transparent;
  box-shadow: none;
  flex: 1 0 auto;
}
body.mx #content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  min-height: 0;
  box-sizing: border-box;
}
body.mx .clear { clear: both; }

/* System bars (osTicket offline / warnings) */
body.mx .error_bar, body.mx .warning_bar, body.mx .notice_bar {
  margin: 0; padding: 10px 24px; text-align: center; font-weight: 500; border: 0;
}
body.mx .error_bar { background: var(--mx-red-soft); color: var(--mx-red); }
body.mx .warning_bar { background: var(--mx-amber-soft); color: var(--mx-amber); }
body.mx .notice_bar { background: var(--mx-blue-soft); color: var(--mx-blue); }

/* ---------- Top bar ---------- */
body.mx #header.mx-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: auto;
  padding: 0;
  background: var(--mx-topbar);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--mx-border);
}
.mx-topbar-inner {
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
body.mx .mx-brand { display: flex; align-items: center; gap: 11px; color: var(--mx-text); text-decoration: none; flex: none; }
body.mx .mx-brand:hover { text-decoration: none; color: var(--mx-text); }
.mx-brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--mx-hero-a), var(--mx-hero-b));
  box-shadow: 0 6px 16px -6px var(--mx-hero-a);
}
.mx-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.mx-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.mx-brand-sub { font-size: 12px; color: var(--mx-text-3); font-weight: 500; }

body.mx #nav.mx-nav {
  display: flex; align-items: center; gap: 4px;
  margin: 0; padding: 0; height: auto;
  background: none; border: 0; box-shadow: none;
  flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
body.mx #nav.mx-nav::-webkit-scrollbar { display: none; }
body.mx #nav.mx-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 13px; margin: 0;
  border-radius: 10px;
  color: var(--mx-text-2);
  font-weight: 500; font-size: 14px;
  background: none;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
body.mx #nav.mx-nav a:hover { background: var(--mx-surface-3); color: var(--mx-text); }
body.mx #nav.mx-nav a.active { background: var(--mx-accent-soft); color: var(--mx-accent); }
.mx-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--mx-accent); color: var(--mx-accent-text);
  font-size: 11px; font-weight: 700; box-sizing: border-box;
}

.mx-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.mx-theme-toggle {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--mx-surface); color: var(--mx-text-2);
  border: 1px solid var(--mx-border);
  transition: background-color .15s, color .15s, border-color .15s;
}
.mx-theme-toggle:hover { color: var(--mx-text); border-color: var(--mx-border-strong); background: var(--mx-surface-2); }
.mx-when-dark { display: none; }
html[data-theme="dark"] .mx-when-dark { display: inline-flex; }
html[data-theme="dark"] .mx-when-light { display: none; }
.mx-when-light, .mx-when-dark { line-height: 0; }

/* Account menu */
.mx-user { position: relative; }
.mx-user summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 8px 0 4px; border-radius: 999px;
  color: var(--mx-text-2); font-weight: 500; font-size: 14px;
  border: 1px solid var(--mx-border); background: var(--mx-surface);
}
.mx-user summary::-webkit-details-marker { display: none; }
.mx-user summary:hover { border-color: var(--mx-border-strong); }
.mx-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--mx-violet), var(--mx-blue));
}
.mx-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mx-text); }
.mx-user[open] summary .mx-ico { transform: rotate(180deg); }
.mx-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px;
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: 12px; box-shadow: var(--mx-shadow-lg); padding: 6px; z-index: 60;
  animation: mx-pop .14s ease-out;
}
.mx-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--mx-border); margin-bottom: 6px; display: flex; flex-direction: column; }
.mx-menu-head span { color: var(--mx-text-3); font-size: 13px; word-break: break-all; }
body.mx .mx-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; color: var(--mx-text); font-size: 14px;
}
body.mx .mx-menu a:hover { background: var(--mx-surface-3); text-decoration: none; color: var(--mx-text); }
@keyframes mx-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- Buttons ---------- */
body.mx .mx-btn, body.mx input[type="submit"], body.mx input[type="button"], body.mx input[type="reset"],
body.mx button:not(.mx-theme-toggle):not([class*="redactor"]):not(.select2-selection__choice__remove),
body.mx .button, body.mx .action-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; max-width: none;
  border-radius: 10px;
  font: 600 14px/1 var(--mx-font);
  cursor: pointer; text-decoration: none; text-shadow: none;
  border: 1px solid var(--mx-border-strong);
  background: var(--mx-surface); color: var(--mx-text);
  box-shadow: var(--mx-shadow-sm);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  position: static; top: auto;
  -webkit-appearance: none; appearance: none;
  box-sizing: border-box;
}
body.mx .mx-btn:hover, body.mx input[type="submit"]:hover, body.mx input[type="button"]:hover,
body.mx input[type="reset"]:hover, body.mx button:not(.mx-theme-toggle):not([class*="redactor"]):hover,
body.mx .button:hover, body.mx .action-button:hover {
  background: var(--mx-surface-2); border-color: var(--mx-text-3); color: var(--mx-text); text-decoration: none;
}
body.mx .mx-btn:active, body.mx input[type="submit"]:active, body.mx .button:active { transform: translateY(1px); }
body.mx .mx-btn-primary, body.mx input[type="submit"], body.mx .button.blue, body.mx .button.green {
  background: var(--mx-accent); border-color: var(--mx-accent); color: var(--mx-accent-text);
}
body.mx .mx-btn-primary:hover, body.mx input[type="submit"]:hover, body.mx .button.blue:hover, body.mx .button.green:hover {
  background: var(--mx-accent-hover); border-color: var(--mx-accent-hover); color: var(--mx-accent-text);
}
body.mx .mx-btn-secondary, body.mx .mx-btn-secondary:hover { width: auto; }
body.mx .mx-btn-ghost { background: transparent; box-shadow: none; }
body.mx #header .mx-btn { height: 38px; }

/* ---------- Form controls ---------- */
body.mx input[type="text"], body.mx input[type="email"], body.mx input[type="password"],
body.mx input[type="tel"], body.mx input[type="number"], body.mx input[type="search"],
body.mx input[type="date"], body.mx input[type="url"], body.mx input:not([type]),
body.mx select, body.mx textarea {
  background: var(--mx-surface);
  color: var(--mx-text);
  border: 1px solid var(--mx-border-strong);
  border-radius: var(--mx-radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .03);
  transition: border-color .15s, box-shadow .15s;
  max-width: 100%;
  box-sizing: border-box;
}
body.mx select { padding-right: 32px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
body.mx input:focus, body.mx select:focus, body.mx textarea:focus {
  outline: none; border-color: var(--mx-accent); box-shadow: 0 0 0 4px var(--mx-ring);
}
body.mx input::placeholder, body.mx textarea::placeholder { color: var(--mx-text-3); }
body.mx input[type="checkbox"], body.mx input[type="radio"] { accent-color: var(--mx-accent); width: 16px; height: 16px; vertical-align: -3px; }
body.mx label { color: var(--mx-text); }
body.mx .required, body.mx label.required, body.mx span.required { color: var(--mx-text); }
body.mx span.error, body.mx font.error, body.mx .error { color: var(--mx-red); }
body.mx div.error input, body.mx .error input { border-color: var(--mx-red); }
body.mx em { color: var(--mx-text-3); }

/* Stock theme styles inputs inside #clientLogin / #ticketForm by ID; match that weight */
body.mx #clientLogin div input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.mx #ticketForm div input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.mx #clientLogin div textarea, body.mx #ticketForm div textarea,
body.mx #clientLogin div select, body.mx #ticketForm div select {
  background-color: var(--mx-surface); color: var(--mx-text); border: 1px solid var(--mx-border-strong);
}
body.mx #clientLogin input[type="submit"], body.mx #ticketForm input[type="submit"], body.mx #reply input[type="submit"] {
  display: inline-flex; width: auto; height: 42px; padding: 0 18px; border-radius: 10px;
  background: var(--mx-accent); border: 1px solid var(--mx-accent); color: var(--mx-accent-text);
}
body.mx #clientLogin input[type="submit"]:hover, body.mx #ticketForm input[type="submit"]:hover, body.mx #reply input[type="submit"]:hover {
  background: var(--mx-accent-hover); border-color: var(--mx-accent-hover);
}

/* ---------- Notices ---------- */
body.mx #msg_notice, body.mx #msg_warning, body.mx #msg_error, body.mx #msg_info, body.mx .warning-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 20px; padding: 12px 16px 12px 16px;
  border-radius: 12px; border: 1px solid; background-image: none;
  font-weight: 500; font-size: 14px;
}
body.mx #msg_notice { background: var(--mx-green-soft); border-color: transparent; color: var(--mx-green); }
body.mx #msg_info { background: var(--mx-blue-soft); border-color: transparent; color: var(--mx-blue); }
body.mx #msg_warning, body.mx .warning-banner { background: var(--mx-amber-soft); border-color: transparent; color: var(--mx-amber); }
body.mx #msg_error { background: var(--mx-red-soft); border-color: transparent; color: var(--mx-red); }

/* ---------- Landing ---------- */
.mx-landing { display: flex; flex-direction: column; gap: 28px; }
.mx-hero {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 52px 48px 48px;
  color: #fff;
  background:
    radial-gradient(1200px 400px at 10% -20%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(120deg, var(--mx-hero-a) 0%, #6d28d9 45%, var(--mx-hero-b) 100%);
  box-shadow: var(--mx-shadow-lg);
}
.mx-hero-glow {
  position: absolute; inset: auto -120px -180px auto; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%);
  pointer-events: none;
}
.mx-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}
.mx-hero > *:not(.mx-hero-glow) { position: relative; z-index: 1; }
.mx-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
}
body.mx .mx-hero h1 { color: #fff; font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; max-width: 760px; }
.mx-hero-sub { margin: 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: rgba(255,255,255,.88); }

.mx-search {
  margin-top: 28px; max-width: 640px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 6px 6px 6px 16px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45);
  color: #64748b;
}
body.mx .mx-search input[type="text"] {
  flex: 1; border: 0; box-shadow: none; padding: 10px 4px; font-size: 16px; background: transparent; color: #0f172a;
}
body.mx .mx-search input[type="text"]:focus { box-shadow: none; }
body.mx .mx-search .mx-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; height: 44px; padding: 0 20px; }

.mx-stats { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
body.mx .mx-stat {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9); font-weight: 500; text-decoration: none;
  transition: background-color .15s;
}
body.mx .mx-stat:hover { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }
.mx-stat-num { font-size: 22px; font-weight: 800; color: #fff; }

.mx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
body.mx .mx-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px; border-radius: var(--mx-radius);
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  box-shadow: var(--mx-shadow); color: var(--mx-text); text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
body.mx .mx-card:hover { transform: translateY(-3px); box-shadow: var(--mx-shadow-lg); border-color: var(--mx-border-strong); text-decoration: none; color: var(--mx-text); }
.mx-card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; flex: none; }
.mx-card-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mx-card-text { color: var(--mx-text-2); font-size: 14px; flex: 1; }
.mx-card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--mx-accent); font-weight: 600; font-size: 14px; }
.mx-card:hover .mx-card-link .mx-ico { transform: translateX(3px); }
.mx-card-link .mx-ico { transition: transform .18s; }

.mx-tone-blue { background: var(--mx-blue-soft); color: var(--mx-blue); }
.mx-tone-violet { background: var(--mx-violet-soft); color: var(--mx-violet); }
.mx-tone-green { background: var(--mx-green-soft); color: var(--mx-green); }

.mx-panel, .mx-about, .mx-callout {
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
}
.mx-panel { padding: 8px 8px 10px; }
.mx-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
body.mx .mx-panel-head h2 { margin: 0; font-size: 17px; }
body.mx .mx-panel-head a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.mx-list { list-style: none; margin: 0; padding: 0; }
body.mx .mx-list a {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 10px;
  color: var(--mx-text); text-decoration: none;
}
body.mx .mx-list a:hover { background: var(--mx-surface-2); text-decoration: none; }
.mx-list li + li a { box-shadow: 0 -1px 0 var(--mx-border); }
.mx-list li a:hover, .mx-list li a:hover + * { box-shadow: none; }
.mx-list-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.mx-list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mx-list-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-list-meta { color: var(--mx-text-3); font-size: 13px; }
.mx-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.mx-pill-open { background: var(--mx-blue-soft); color: var(--mx-blue); }
.mx-pill-done { background: var(--mx-green-soft); color: var(--mx-green); }
.mx-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; color: var(--mx-text-3); text-align: center; }
.mx-empty p { margin: 0; }

.mx-callout { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.mx-callout .mx-card-icon { margin: 0; }
.mx-callout > div { flex: 1; }
body.mx .mx-callout h2 { margin: 0 0 2px; font-size: 17px; }
.mx-callout p { margin: 0; color: var(--mx-text-2); font-size: 14px; }

.mx-about { padding: 22px 26px; color: var(--mx-text-2); font-size: 14px; }
body.mx .mx-about.thread-body h1 { font-size: 17px; margin: 0 0 6px; color: var(--mx-text); }
body.mx .mx-about.thread-body p { margin: 0; color: var(--mx-text-2); line-height: 1.65; }

/* Featured KB articles */
body.mx .featured-category { float: none; width: auto; margin: 0; padding: 6px 16px 14px; }
body.mx .featured-category .category-name { font-weight: 700; color: var(--mx-text); margin: 0 0 6px; }
body.mx .article-headline { margin: 0; padding: 8px 0; border-top: 1px solid var(--mx-border); }
body.mx .article-teaser { color: var(--mx-text-3); }

/* ---------- Sign in ---------- */
.mx-auth { display: grid; place-items: start center; padding: 24px 0; }
.mx-auth-card {
  width: 100%; max-width: 440px; box-sizing: border-box;
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: 20px; box-shadow: var(--mx-shadow-lg);
  padding: 36px 36px 28px; text-align: center;
}
.mx-auth-mark {
  width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 16px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--mx-hero-a), var(--mx-hero-b));
  box-shadow: 0 10px 24px -10px var(--mx-hero-a);
}
body.mx .mx-auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.mx-auth-lead { color: var(--mx-text-2); font-size: 14px; margin: 0 0 24px; }
.mx-sso { display: flex; flex-direction: column; gap: 10px; }
body.mx .mx-sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 48px; border-radius: 12px; font-weight: 600; font-size: 15px;
  background: var(--mx-surface); color: var(--mx-text); border: 1px solid var(--mx-border-strong);
  box-shadow: var(--mx-shadow-sm); text-decoration: none;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .1s;
}
body.mx .mx-sso-btn:hover { background: var(--mx-surface-2); border-color: var(--mx-text-3); text-decoration: none; color: var(--mx-text); box-shadow: var(--mx-shadow); }
body.mx .mx-sso-btn:active { transform: translateY(1px); }
.mx-auth-alt { margin-top: 18px; text-align: left; }
.mx-auth-alt summary {
  cursor: pointer; list-style: none; text-align: center; color: var(--mx-text-3); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 12px;
}
.mx-auth-alt summary::-webkit-details-marker { display: none; }
.mx-auth-alt summary::before, .mx-auth-alt summary::after { content: ""; flex: 1; border-top: 1px solid var(--mx-border); }
.mx-auth-alt summary:hover { color: var(--mx-text); }
body.mx #clientLogin.mx-auth-form {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  margin: 16px 0 0; padding: 0; border: 0; box-shadow: none; background: none; width: auto;
}
body.mx .mx-auth-form label { font-size: 13px; font-weight: 600; margin-top: 6px; }
body.mx .mx-auth-form input[type="text"], body.mx .mx-auth-form input[type="password"] { width: 100%; height: 44px; }
.mx-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; }
body.mx .mx-auth-row input[type="submit"] { width: auto; }
.mx-auth-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--mx-border); color: var(--mx-text-3); font-size: 13px; }
.mx-auth-foot p { margin: 4px 0; }

/* Ticket status lookup (view.php) + legacy #clientLogin forms */
body.mx #clientLogin {
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
  padding: 26px; margin-top: 18px; width: auto; max-width: 820px;
}
body.mx #clientLogin .instructions { color: var(--mx-text-2); }
body.mx #clientLogin strong { color: var(--mx-red); }
body.mx #clientLogin input[type="text"], body.mx #clientLogin input[type="password"] { width: 100%; max-width: 340px; height: 42px; }
body.mx .login-box { box-shadow: none; padding: 0 28px 0 0; }
body.mx .login-box > div { margin-bottom: 12px; }
body.mx #clientLogin label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 4px; }

/* ---------- Page headings & generic content ---------- */
body.mx #content > h1, body.mx #content > form > h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
body.mx #content > p { color: var(--mx-text-2); }
body.mx table { border-collapse: separate; border-spacing: 0; }
body.mx td, body.mx th { color: inherit; }

/* ---------- New ticket / profile / register (dynamic forms) ---------- */
body.mx #ticketForm, body.mx form#clientProfile, body.mx form#client-register {
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
  padding: 8px 28px 26px; margin-top: 20px;
}
body.mx #ticketForm > table, body.mx form#clientProfile table, body.mx form#client-register table { width: 100%; }
body.mx #ticketForm table td, body.mx form#clientProfile table td, body.mx form#client-register table td { padding: 4px 0; border: 0; }
body.mx #ticketForm hr, body.mx form#clientProfile hr { margin: 18px 0; }
body.mx #ticketForm > table > tbody:first-child > tr:first-child hr, body.mx #ticketForm > hr { display: none; }
body.mx .form-header h3, body.mx #ticketForm h3, body.mx form#clientProfile h3 { font-size: 17px; margin: 18px 0 2px; }
body.mx .form-header em, body.mx .form-header div { color: var(--mx-text-3); }
body.mx #ticketForm label, body.mx form#clientProfile label { font-weight: 600; font-size: 14px; }
body.mx #ticketForm input[type="text"], body.mx #ticketForm input[type="email"], body.mx #ticketForm input[type="tel"],
body.mx #ticketForm select, body.mx #ticketForm textarea,
body.mx form#clientProfile input[type="text"], body.mx form#clientProfile select { min-height: 42px; margin-top: 4px; }
body.mx #ticketForm input[size="40"], body.mx #ticketForm input[size="30"], body.mx #ticketForm select#topicId { width: 100%; max-width: 460px; }
body.mx #ticketForm .buttons, body.mx p.buttons, body.mx form#clientProfile p:last-child {
  display: flex; justify-content: flex-end; gap: 10px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--mx-border);
}
body.mx #ticketForm .buttons input[type="reset"], body.mx #ticketForm .buttons input[type="button"] { background: var(--mx-surface); color: var(--mx-text); border-color: var(--mx-border-strong); }

/* Rich text editor (Redactor) */
body.mx .redactor-box, body.mx .redactor-box.redactor-styles-on {
  border: 1px solid var(--mx-border-strong) !important; border-radius: var(--mx-radius-sm); overflow: hidden;
  background: var(--mx-surface); box-shadow: none;
}
body.mx .redactor-box.redactor-focus { border-color: var(--mx-accent) !important; box-shadow: 0 0 0 4px var(--mx-ring); }
body.mx .redactor-toolbar, body.mx .redactor-toolbar-wrapper { background: var(--mx-surface-2) !important; border-bottom: 1px solid var(--mx-border); box-shadow: none !important; }
body.mx .redactor-toolbar a, body.mx .redactor-toolbar a.re-button { color: var(--mx-text-2) !important; background: transparent; border-radius: 6px; }
body.mx .redactor-toolbar a:hover { background: var(--mx-surface-3) !important; color: var(--mx-text) !important; }
body.mx .redactor-styles, body.mx .redactor-in, body.mx .redactor-editor { background: var(--mx-surface) !important; color: var(--mx-text) !important; font-family: var(--mx-font) !important; }
body.mx .redactor-placeholder:before, body.mx .redactor-in.redactor-placeholder:before { color: var(--mx-text-3) !important; }
html[data-theme="dark"] body.mx .redactor-dropdown, html[data-theme="dark"] body.mx .redactor-modal { background: var(--mx-surface); color: var(--mx-text); }

/* File drop zone */
body.mx .filedrop .dropzone {
  border: 1.5px dashed var(--mx-border-strong) !important; border-radius: var(--mx-radius-sm);
  background: var(--mx-surface-2) !important; color: var(--mx-text-3); padding: 14px;
}
body.mx .filedrop .dropzone a { color: var(--mx-accent); }
body.mx .filedrop .files, body.mx .filedrop .file { background: var(--mx-surface-2); color: var(--mx-text); border-color: var(--mx-border); }

/* Select2 */
body.mx .select2-container--default .select2-selection--single,
body.mx .select2-container--default .select2-selection--multiple {
  background: var(--mx-surface); border: 1px solid var(--mx-border-strong); border-radius: var(--mx-radius-sm); min-height: 42px;
}
body.mx .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--mx-text); line-height: 40px; }
body.mx .select2-dropdown { background: var(--mx-surface); border-color: var(--mx-border-strong); color: var(--mx-text); }
body.mx .select2-results__option--highlighted { background: var(--mx-accent) !important; color: var(--mx-accent-text) !important; }

/* ---------- Tickets list ---------- */
body.mx .search.well {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 14px 16px;
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius); box-shadow: var(--mx-shadow-sm);
}
body.mx .search.well .flush-left, body.mx .search.well .pull-right { float: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body.mx .search.well .pull-right { margin-left: auto; }
body.mx .search.well input[type="text"] { height: 40px; min-width: 220px; }
body.mx .search.well select { height: 40px; }
body.mx #ticketSearchForm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body.mx .states small { color: var(--mx-text-3); }
body.mx a.state { display: inline-flex; padding: 6px 12px; border-radius: 999px; color: var(--mx-text-2); font-weight: 500; font-size: 14px; }
body.mx a.state:hover { background: var(--mx-surface-3); text-decoration: none; color: var(--mx-text); }
body.mx a.state.active, body.mx .active.state { background: var(--mx-accent-soft); color: var(--mx-accent); font-weight: 600; }

body.mx #ticketTable {
  width: 100%; border: 1px solid var(--mx-border); border-radius: var(--mx-radius);
  background: var(--mx-surface); box-shadow: var(--mx-shadow); overflow: hidden;
}
body.mx #ticketTable caption {
  caption-side: top; text-align: left; padding: 0 0 10px; background: none; border: 0;
  color: var(--mx-text); font-size: 15px; font-weight: 700;
}
body.mx #ticketTable th {
  height: auto; line-height: 1.3; padding: 12px 16px;
  background: var(--mx-surface-2); border: 0; border-bottom: 1px solid var(--mx-border);
  color: var(--mx-text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
body.mx #ticketTable th a { color: var(--mx-text-3); }
body.mx #ticketTable td { padding: 13px 16px; border: 0; border-bottom: 1px solid var(--mx-border); background: transparent; color: var(--mx-text); font-size: 14px; }
body.mx #ticketTable tr:last-child td { border-bottom: 0; }
body.mx #ticketTable tr.alt td { background: transparent; }
body.mx #ticketTable tbody tr { transition: background-color .12s; }
body.mx #ticketTable tbody tr:hover td { background: var(--mx-surface-2); }
body.mx #ticketTable td a.Icon { padding-left: 0; background: none; font-weight: 600; }
body.mx #ticketTable td a.Icon::before { content: "#"; color: var(--mx-text-3); font-weight: 500; }
body.mx #ticketTable td a.truncate, body.mx #ticketTable td .truncate { color: var(--mx-text); }

body.mx #pagination { margin-top: 16px; }
body.mx #pagination li a, body.mx #pagination .active { border-radius: 8px; border: 1px solid var(--mx-border); background: var(--mx-surface); color: var(--mx-text-2); padding: 4px 10px; }
body.mx #pagination .active { background: var(--mx-accent); border-color: var(--mx-accent); color: var(--mx-accent-text); }

/* ---------- Ticket view ---------- */
body.mx #ticketInfo { border-spacing: 0; }
body.mx #ticketInfo h1 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 24px; padding: 0 0 14px; margin: 0 0 16px; border-bottom: 1px solid var(--mx-border);
}
body.mx #ticketInfo h1 small { color: var(--mx-text-3); font-size: 15px; }
body.mx #ticketInfo h1 .pull-right { margin-left: auto; display: flex; gap: 8px; }
body.mx #ticketInfo .action-button { height: 36px; padding: 0 12px; font-weight: 500; }
body.mx .infoTable, body.mx table.custom-data {
  background: var(--mx-surface); border: 1px solid var(--mx-border); border-radius: var(--mx-radius);
  box-shadow: var(--mx-shadow-sm); padding: 6px 4px; width: 100%;
}
body.mx .infoTable th, body.mx table.custom-data th {
  background: transparent; color: var(--mx-text-3); font-weight: 500; font-size: 13px; padding: 6px 14px; text-align: left; white-space: nowrap;
}
body.mx .infoTable td, body.mx table.custom-data td { padding: 6px 14px; color: var(--mx-text); font-weight: 500; }
body.mx table.custom-data .headline { background: transparent; border-bottom: 1px solid var(--mx-border); color: var(--mx-text); font-size: 14px; }
body.mx #ticketInfo > tbody > tr > td { padding: 0 8px 0 0; vertical-align: top; }

body.mx #ticketThread::before, body.mx .thread-entry::before, body.mx .thread-entry::after { border-color: var(--mx-border); }
body.mx #ticketThread::before { border-left-color: var(--mx-border) !important; background: var(--mx-border); }
body.mx .thread-entry .header {
  border: 1px solid var(--mx-border); border-bottom: 0; border-radius: 14px 14px 0 0;
  background: var(--mx-surface-2); color: var(--mx-text-2); padding: 10px 16px;
}
body.mx .thread-entry.message .header { background: var(--mx-surface-2); }
body.mx .thread-entry.response .header { background: var(--mx-accent-soft); border-color: var(--mx-border); }
body.mx .thread-entry .header b, body.mx .thread-entry .header .title { color: var(--mx-text); }
body.mx .thread-entry.avatar .header:before, body.mx .thread-entry.avatar .header:after { display: none; }
body.mx .thread-entry .thread-body {
  background: var(--mx-surface); color: var(--mx-text); border: 1px solid var(--mx-border);
  border-radius: 0 0 14px 14px; padding: 14px 16px; box-shadow: var(--mx-shadow-sm);
}
body.mx .thread-body, body.mx .thread-body p, body.mx .thread-body div { color: inherit; }
body.mx .thread-body blockquote { border-left-color: var(--mx-border-strong); color: var(--mx-text-2); }
body.mx .thread-body pre, body.mx .thread-body code { background: var(--mx-surface-3); color: var(--mx-text); border-color: var(--mx-border); }
body.mx .thread-body .attachments { border-top-color: var(--mx-border); background: transparent; }
body.mx img.avatar { border-radius: 50%; }
body.mx .thread-event { color: var(--mx-text-3); }
body.mx .thread-event .type-icon { background: var(--mx-surface-3); color: var(--mx-text-2); border-color: var(--mx-bg); }
body.mx .thread-event .description { color: var(--mx-text-2); }
body.mx .label, body.mx .label-bare { border-radius: 999px; }

body.mx #reply {
  margin-top: 24px; padding: 22px 24px;
  background: var(--mx-surface); border: 1px solid var(--mx-border);
  border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
}
body.mx #reply h2 { border-bottom: 1px solid var(--mx-border); padding-bottom: 10px; margin: 0 0 14px; font-size: 18px; }
body.mx #reply > table, body.mx #reply table { width: 100%; }
body.mx #reply textarea { width: 100% !important; }
body.mx #reply input[type="text"], body.mx #reply #response_options textarea { background: var(--mx-surface); border-color: var(--mx-border-strong); }

/* Knowledge base */
body.mx .thread-body { background-color: transparent; color: var(--mx-text); font-family: var(--mx-font); }
body.mx .row { display: flex; gap: 32px; align-items: flex-start; }
body.mx .row > .span8 { flex: 1; min-width: 0; width: auto; }
body.mx .row > .span4 { flex: 0 0 280px; width: auto; float: none; margin: 0; }
body.mx .sidebar { width: auto; margin: 0; display: flex; flex-direction: column; gap: 14px; }
body.mx .sidebar .searchbar .search, body.mx .sidebar select { width: 100%; height: 42px; }
body.mx .sidebar .content {
  background: var(--mx-surface); border: 1px solid var(--mx-border); border-radius: var(--mx-radius);
  box-shadow: var(--mx-shadow-sm); padding: 16px 18px; color: var(--mx-text);
}
body.mx .sidebar section .header, body.mx .sidebar section strong { display: block; font-weight: 700; margin-bottom: 8px; }
body.mx .sidebar section a, body.mx .sidebar section div { display: block; padding: 4px 0; font-size: 14px; }
body.mx #breadcrumbs { color: var(--mx-text-3); font-size: 14px; margin-bottom: 18px; }
body.mx .faq-content {
  background: var(--mx-surface); border: 1px solid var(--mx-border); border-radius: var(--mx-radius);
  box-shadow: var(--mx-shadow); padding: 28px 32px;
}
body.mx .faq-content .article-title { float: none; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--mx-text); }
body.mx .faq-content .faded { color: var(--mx-text-3); font-size: 13px; margin-top: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--mx-border); }
body.mx .faq-content br { display: none; }
body.mx .faq-content .thread-body { font-size: 15px !important; line-height: 1.7; margin-top: 18px !important; }
body.mx .faq-content .thread-body h3 { font-size: 17px; margin: 22px 0 6px; color: var(--mx-text); }
body.mx .faq-content .thread-body ol, body.mx .faq-content .thread-body ul { padding-left: 22px; }
body.mx .faq-content .thread-body li { margin: 6px 0; }
body.mx .faq-content .thread-body li::marker { color: var(--mx-accent); font-weight: 700; }
body.mx .thread-body kbd {
  font: 600 12px/1 var(--mx-font); padding: 3px 6px; border-radius: 5px;
  background: var(--mx-surface-3); border: 1px solid var(--mx-border-strong); border-bottom-width: 2px; color: var(--mx-text);
}
body.mx .faq-content .thread-body a:not(.button) { color: var(--mx-accent); }
body.mx .faq-content .thread-body p:last-child {
  margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--mx-accent-soft); color: var(--mx-text);
}

body.mx #faq ol {
  list-style: none; margin: 0; padding: 6px; counter-reset: none;
  background: var(--mx-surface); border: 1px solid var(--mx-border); border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
}
body.mx #faq ol li { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.mx #faq ol li + li { border-top: 1px solid var(--mx-border); }
body.mx #faq ol li a {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-radius: 10px;
  background: none; color: var(--mx-text); font-weight: 500;
}
body.mx #faq ol li a::before {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 9px; background-color: var(--mx-green-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
body.mx #faq ol li a:hover { background: var(--mx-surface-2); text-decoration: none; color: var(--mx-accent); }

body.mx #kb { margin: 0; padding: 0; }
body.mx #kb > li {
  list-style: none; position: relative; margin: 0 0 16px; padding: 22px 24px 22px 40px; min-height: 0;
  background: var(--mx-surface); border: 1px solid var(--mx-border); border-radius: var(--mx-radius); box-shadow: var(--mx-shadow);
}
body.mx #kb > li > i { position: absolute; left: 24px; top: 20px; width: 44px; height: 44px; border-radius: 12px;
  background-color: var(--mx-green-soft); background-repeat: no-repeat; background-position: center; background-size: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E"); }
body.mx #kb .popular-faq { padding: 5px 0; }
body.mx #kb .popular-faq i { color: var(--mx-text-3); margin-right: 6px; }
body.mx #kb > li h4 { margin: 0 0 6px; font-size: 18px; }
body.mx #kb > li h4 a { color: var(--mx-text); font-weight: 700; }
body.mx #kb > li h4 span { color: var(--mx-text-3); font-weight: 500; }
body.mx #kb > li .faded, body.mx #kb > li > div { color: var(--mx-text-2); }
body.mx #kb > li ul, body.mx #kb > li > div > div { margin-top: 10px; }
body.mx #kb > li a.popular-faq, body.mx #kb > li div a { display: inline-block; padding: 3px 0; }
body.mx #kb-search, body.mx .search-form { background: none; border: 0; }
@media (max-width: 900px) {
  body.mx .row { flex-direction: column; }
  body.mx .row > .span4 { flex-basis: auto; width: 100%; }
  body.mx .faq-content { padding: 20px; }
}

/* jQuery UI pieces that appear on client pages */
html[data-theme="dark"] body.mx .ui-widget-content { background: var(--mx-surface); color: var(--mx-text); border-color: var(--mx-border); }
html[data-theme="dark"] body.mx .ui-widget-header { background: var(--mx-surface-3); color: var(--mx-text); border-color: var(--mx-border); }
html[data-theme="dark"] body.mx .ui-state-default { background: var(--mx-surface-2); color: var(--mx-text); border-color: var(--mx-border); }

/* Loading overlay */
body.mx #overlay { background: rgba(2, 6, 23, .5); }
body.mx #loading { background: var(--mx-surface); color: var(--mx-text); border: 1px solid var(--mx-border); border-radius: var(--mx-radius); box-shadow: var(--mx-shadow-lg); }

/* Dark mode: stock images and icon sprites that assume a white page */
html[data-theme="dark"] body.mx #ticketTable td a.Icon, html[data-theme="dark"] body.mx .Icon { background-image: none; }
html[data-theme="dark"] body.mx .thread-body img:not(.avatar) { opacity: .92; }

/* ---------- Footer ---------- */
body.mx #footer.mx-footer { flex: none; text-align: left; font-size: 13px; color: var(--mx-text-3); border-top: 1px solid var(--mx-border); background: var(--mx-surface); }
.mx-footer-inner { box-sizing: border-box; max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
body.mx #footer p { margin: 0; }
body.mx #footer a { color: var(--mx-text-2); }
body.mx #footer a:hover { color: var(--mx-text); }
body.mx #footer #poweredBy { display: inline; width: auto; height: auto; text-indent: 0; background: none; margin: 0; }
.mx-footer-links { display: flex; gap: 10px; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .mx-topbar-inner { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 16px 8px; }
  body.mx #nav.mx-nav { grid-column: 1 / -1; grid-row: 2; margin: 0 -4px; }
  .mx-user-name { display: none; }
  body.mx .mx-brand { flex: 1 1 auto; min-width: 0; }
  .mx-brand-text { min-width: 0; }
  .mx-brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.mx #content { padding: 20px 16px 40px; }
  .mx-hero { padding: 36px 24px 30px; border-radius: 18px; }
  body.mx .mx-hero h1 { font-size: 30px; }
  .mx-hero-sub { font-size: 15px; }
  .mx-callout { flex-direction: column; align-items: flex-start; }
  body.mx #ticketForm, body.mx form#clientProfile { padding: 4px 16px 18px; }
  body.mx #ticketInfo, body.mx #ticketInfo > tbody, body.mx #ticketInfo > tbody > tr, body.mx #ticketInfo > tbody > tr > td { display: block; width: 100% !important; }
  body.mx #ticketInfo > tbody > tr > td { padding: 0 0 12px; }
  body.mx #ticketTable { display: block; overflow-x: auto; }
  .mx-auth-card { padding: 28px 22px 22px; }
  .mx-footer-inner { padding: 16px; }
}
@media (max-width: 520px) {
  .mx-brand-sub { display: none; }
  .mx-search { flex-wrap: wrap; padding: 8px; }
  body.mx .mx-search .mx-btn-primary { width: 100%; }
  body.mx .mx-hero h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  body.mx *, body.mx *::before, body.mx *::after { transition: none !important; animation: none !important; }
}
