:root {
  color-scheme: light;
  --txa-primary: #143331;
  --txa-accent: #f3c45f;
  --txa-action: #d94f30;
  --txa-background: #f5f7f9;
  --txa-panel: #ffffff;
  --txa-text: #1d252c;
  --txa-muted: #5c6d72;
  --txa-border: #d9e2e1;
  --txa-highlight: #f3c45f;
  --txa-highlight-text: #111827;
  --txa-incoming-accent: #c9e4d8;
  --txa-soft: color-mix(in srgb, var(--txa-panel) 82%, var(--txa-background));
  --txa-input-border: var(--txa-border);
  --txa-panel-raised: color-mix(in srgb, var(--txa-panel) 94%, var(--txa-background));
  --txa-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --txa-shadow-soft: 0 14px 38px rgba(15, 23, 42, 0.1);
  --txa-radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--txa-background);
  color: var(--txa-text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-background) 72%, var(--txa-panel)), var(--txa-background));
  color: var(--txa-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--txa-primary) 88%, #000000), var(--txa-primary));
}

.auth-panel {
  width: min(100%, 520px);
  border-radius: 8px;
  background: var(--txa-panel);
  border: 1px solid color-mix(in srgb, var(--txa-border) 65%, transparent);
  padding: 32px;
  box-shadow: var(--txa-shadow);
  backdrop-filter: blur(12px);
}

.auth-panel h1 {
  color: var(--txa-text);
  margin-bottom: 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button {
  min-height: 40px;
  border: 1px solid var(--txa-input-border);
  border-radius: 7px;
  background: var(--txa-panel);
  cursor: pointer;
  font-weight: 800;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.auth-tabs button.is-active {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
}

.landing-shell {
  min-height: 100vh;
  background: #07111f;
  color: #f8fbff;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 13, 28, 0.86);
  backdrop-filter: blur(16px);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.landing-logo span {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.landing-logo strong span {
  display: inline;
  color: #1187f7;
}

.landing-logo small {
  color: #7fbfff;
  font-size: 0.68rem;
  font-weight: 800;
}

.landing-logo img {
  width: 42px;
  height: 36px;
  object-fit: contain;
}

.landing-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.landing-links a,
.landing-links button,
.hero-actions a,
.hero-actions button,
.landing-footer button,
.landing-footer a {
  color: inherit;
  text-decoration: none;
}

.landing-links a,
.landing-links button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  font-weight: 800;
  cursor: pointer;
}

.landing-links a:hover,
.landing-links button:hover {
  background: rgba(17, 135, 247, 0.1);
}

.landing-links .nav-cta {
  background: #1187f7;
  color: #ffffff;
}

.landing-shell .eyebrow {
  color: #7fbfff;
}

.landing-shell .primary-action {
  background: linear-gradient(180deg, #2fa4ff, #1179ed);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 135, 247, 0.28);
}

.landing-shell .secondary-action {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.landing-auth .secondary-action,
.landing-auth .primary-action {
  color: #ffffff;
}

.landing-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: calc(100vh - 69px);
  padding: clamp(58px, 9vw, 118px) clamp(20px, 6vw, 88px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 13, 28, 0.94) 0%, rgba(5, 13, 28, 0.78) 46%, rgba(5, 13, 28, 0.38) 100%),
    url("/assets/ticketxa-hero-bg.png") center / cover no-repeat,
    #07111f;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-brand {
  display: grid;
  grid-template-columns: clamp(96px, 14vw, 168px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  margin: 8px 0 26px;
}

.hero-brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.32));
}

.hero-brand strong {
  display: block;
  color: #ffffff;
  font-size: clamp(3.6rem, 9.5vw, 8.6rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-brand strong span {
  color: #1187f7;
}

.hero-brand small {
  display: block;
  margin-top: 18px;
  color: #d7e8f8;
  font-size: clamp(1.2rem, 2.4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #c6d8ea;
  font-size: clamp(1.08rem, 2.2vw, 1.42rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .primary-action,
.hero-actions .secondary-action {
  display: inline-flex;
  align-items: center;
}

.hero-snapshot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 138px));
  gap: 10px;
  margin-top: 58px;
}

.hero-snapshot div {
  border: 1px solid rgba(127, 191, 255, 0.26);
  border-radius: 8px;
  background: rgba(8, 24, 48, 0.78);
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.hero-snapshot span {
  display: block;
  color: #91b7d7;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-snapshot strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 1.7rem;
}

.landing-band,
.landing-auth {
  padding: 72px clamp(20px, 6vw, 88px);
}

.landing-section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.landing-section-heading h2,
.landing-auth h2 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.landing-feature-grid article,
.landing-workflow li {
  border: 1px solid rgba(127, 191, 255, 0.16);
  border-radius: 8px;
  background: #0d1d36;
  padding: 22px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.landing-feature-grid h3 {
  margin-bottom: 9px;
  color: #ffffff;
}

.landing-feature-grid p,
.landing-workflow span {
  color: #b3c6d8;
  line-height: 1.55;
}

.landing-workflow {
  background: #050d1a;
  color: #ffffff;
}

.landing-workflow .eyebrow,
.landing-workflow h2 {
  color: #ffffff;
}

.landing-workflow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-workflow li {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.landing-workflow strong {
  display: block;
  margin-bottom: 8px;
}

.landing-workflow span {
  color: rgba(255, 255, 255, 0.72);
}

.landing-auth {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.landing-auth .auth-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #f8fbff;
  border-color: rgba(127, 191, 255, 0.28);
  color: #162435;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.landing-auth .eyebrow {
  color: #0b5fb8;
}

.landing-auth .auth-panel h2 {
  color: #061742;
  margin-bottom: 26px;
}

.landing-auth .auth-panel button,
.landing-auth input {
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

.landing-auth .auth-tabs button.is-active {
  background: #1187f7;
  border-color: #1187f7;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 135, 247, 0.24);
}

.landing-auth .auth-tabs button {
  background: #ffffff;
  color: #223349;
  border-color: #c9d9e8;
}

.landing-auth .auth-tabs button:hover {
  background: rgba(17, 135, 247, 0.1);
  border-color: #1187f7;
  color: #061742;
  box-shadow: 0 8px 20px rgba(17, 135, 247, 0.15);
}

.landing-auth .auth-tabs button.is-active:hover {
  background: #1187f7;
  color: #ffffff;
}

.landing-auth label {
  color: #486278;
}

.landing-auth input {
  background: #ffffff;
  color: #112033;
  border-color: #c9d9e8;
}

.landing-auth input:hover {
  background: #f2f8ff;
  border-color: #1187f7;
  box-shadow: 0 8px 18px rgba(17, 135, 247, 0.12);
}

.landing-auth input:focus {
  border-color: #1187f7;
  box-shadow: 0 0 0 3px rgba(17, 135, 247, 0.2);
}

.landing-auth .primary-action:hover,
.landing-auth .secondary-action:hover {
  border-color: #1187f7;
  box-shadow: 0 14px 28px rgba(17, 135, 247, 0.2);
}

.landing-auth .auth-form .primary-action {
  border: 1px solid #1187f7;
}

.landing-auth .auth-form .primary-action:hover {
  background: linear-gradient(180deg, #4ab0ff, #0c6fe0);
  border-color: #075ec0;
  box-shadow: 0 16px 32px rgba(17, 135, 247, 0.32);
  transform: translateY(-1px);
}

.landing-auth .secondary-action:hover {
  background: #eef7ff;
  color: #061742;
}

.landing-auth .form-error {
  color: #c93636;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 8, 18, 0.68);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 32px;
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  background: #ffffff;
  color: #223349;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: 800;
}

.auth-close:hover {
  background: #eef7ff;
  border-color: #1187f7;
  color: #061742;
  box-shadow: 0 8px 18px rgba(17, 135, 247, 0.16);
  transform: translateY(-1px);
}

body.auth-modal-open {
  overflow: hidden;
}

.landing-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 28px;
  color: #98b5cf;
  font-weight: 800;
}

.landing-footer button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.form-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--txa-action);
  font-weight: 700;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 18%, transparent), transparent 260px),
    var(--txa-background);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-primary) 90%, var(--txa-highlight)), var(--txa-primary) 44%, color-mix(in srgb, var(--txa-primary) 88%, #000000));
  color: #eef8f5;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-block {
  display: grid;
  gap: 14px;
  padding: 4px 2px 8px;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--txa-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: color-mix(in srgb, var(--txa-highlight) 58%, #ffffff);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.8rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.side-note {
  margin: 0;
  color: rgba(238, 248, 245, 0.74);
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.filters {
  display: grid;
  gap: 9px;
}

.filter {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: inherit;
  text-align: left;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.filter.is-active,
.filter:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.filter:hover {
  transform: translateX(2px);
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.ai-sidebar {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--txa-radius);
  background: rgba(255, 255, 255, 0.07);
  padding: 12px;
}

.ai-sidebar label {
  color: rgba(238, 248, 245, 0.82);
  font-size: 0.82rem;
}

.ai-sidebar textarea {
  min-height: 76px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 9px;
}

.ai-sidebar textarea::placeholder {
  color: rgba(238, 248, 245, 0.55);
}

.ai-action {
  min-height: 34px;
  border: 0;
  border-radius: var(--txa-radius);
  background: var(--txa-highlight);
  color: var(--txa-highlight-text);
  cursor: pointer;
  font-weight: 900;
}

.ai-action:disabled {
  cursor: progress;
  opacity: 0.72;
}

.ai-answer {
  max-height: 210px;
  overflow: auto;
  border-radius: var(--txa-radius);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.92);
  padding: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.stat-shortcut {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  padding: 9px 6px;
  cursor: pointer;
  text-align: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.stat-shortcut:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
  transform: translateY(-1px);
}

.stat-label {
  color: #b6cfca;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.stat-shortcut:hover .stat-label {
  color: inherit;
}

.stat-count {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
}

.stat-shortcut.has-count .stat-count,
.stat-shortcut.has-count:hover .stat-count {
  color: #ff4d4d;
}

.stat-shortcut:hover .stat-count {
  color: inherit;
}

.stat-shortcut.has-count:hover .stat-count {
  color: #ff4d4d;
}

.workbench {
  min-width: 0;
  padding: 30px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--txa-border) 80%, transparent);
  border-radius: var(--txa-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 94%, var(--txa-background)), var(--txa-panel));
  box-shadow: var(--txa-shadow-soft);
}

.primary-action,
.secondary-action {
  min-height: 42px;
  border: 0;
  border-radius: var(--txa-radius);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-action {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-action) 82%, #ffffff), var(--txa-action));
  color: white;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--txa-action) 24%, transparent);
}

.secondary-action {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 92%, var(--txa-background)), var(--txa-soft));
  color: var(--txa-text);
  border: 1px solid var(--txa-border);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.composer {
  margin-bottom: 20px;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 96%, var(--txa-background)), var(--txa-panel));
  padding: 20px;
  box-shadow: var(--txa-shadow-soft);
}

form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--txa-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  padding: 10px 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--txa-highlight);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--txa-highlight) 24%, transparent);
}

textarea {
  resize: vertical;
}

.wide,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 130px);
}

.status-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.status-tabs button {
  min-height: 36px;
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: capitalize;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.status-tabs button.is-active,
.status-tabs button:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.ticket-search {
  margin-bottom: 12px;
}

.ticket-search input {
  min-height: 38px;
}

.seat-layout {
  display: grid;
  gap: 18px;
}

.config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  width: fit-content;
}

.config-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.config-tab.is-active,
.config-tab:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-selector button {
  min-height: 42px;
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  cursor: pointer;
  font-weight: 800;
}

.mode-selector button.is-active,
.mode-selector button:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.inline-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.config-panel {
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 96%, var(--txa-background)), var(--txa-panel));
  padding: 22px;
  box-shadow: var(--txa-shadow-soft);
}

.config-panel h3 {
  margin-bottom: 8px;
}

.subscription-shell {
  display: grid;
  gap: 18px;
}

.subscription-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.subscription-overview p:last-child {
  margin-bottom: 0;
}

.subscription-status,
.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-setup {
  display: grid;
  gap: 10px;
}

.billing-setup .dns-status {
  margin-top: 4px;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.subscription-card {
  display: grid;
  gap: 18px;
  align-content: start;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 96%, var(--txa-background)), var(--txa-panel));
  padding: 18px;
  box-shadow: var(--txa-shadow-soft);
}

.subscription-card.is-current {
  border-color: color-mix(in srgb, var(--txa-highlight) 70%, var(--txa-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--txa-highlight) 24%, transparent), var(--txa-shadow-soft);
}

.subscription-card h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.subscription-card h4 {
  margin-bottom: 8px;
  color: var(--txa-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.subscription-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.subscription-card li {
  color: var(--txa-text);
  line-height: 1.35;
}

.subscription-card button {
  align-self: end;
}

.billing-actions button {
  flex: 1 1 130px;
}

.subscription-card button:disabled {
  cursor: default;
  opacity: 0.82;
}

.subscription-card-top {
  display: grid;
  gap: 8px;
}

.subscription-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.subscription-price strong {
  font-size: 2rem;
  line-height: 1;
}

.subscription-price span {
  color: var(--txa-muted);
  font-weight: 800;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.theme-card {
  min-height: 116px;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.theme-card.is-active,
.theme-card:hover {
  border-color: var(--txa-highlight);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--txa-highlight) 38%, transparent);
}

.theme-card:hover {
  transform: translateY(-1px);
}

.theme-card.is-active {
  background: color-mix(in srgb, var(--txa-highlight) 14%, var(--txa-panel));
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}

.theme-swatch {
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.custom-theme-form {
  display: grid;
  gap: 14px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.color-grid input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

.copy-value {
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-soft);
  color: var(--txa-text);
  margin: 14px 0;
  padding: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.dns-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ticket-list,
.ticket-detail {
  min-width: 0;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--txa-panel) 97%, var(--txa-background)), var(--txa-panel));
  box-shadow: var(--txa-shadow-soft);
}

.ticket-list {
  overflow: auto;
}

.ticket-row {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 116px;
  border: 0;
  border-bottom: 1px solid var(--txa-border);
  background: var(--txa-panel);
  color: inherit;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.ticket-row:hover,
.ticket-row.is-selected {
  background: color-mix(in srgb, var(--txa-highlight) 14%, var(--txa-panel));
}

.ticket-row:hover strong,
.ticket-row.is-selected strong {
  color: color-mix(in srgb, var(--txa-text) 72%, var(--txa-highlight));
}

.ticket-row.is-selected::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--txa-highlight);
}

.ticket-row strong {
  overflow-wrap: anywhere;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--txa-muted);
  font-size: 0.84rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: var(--txa-soft);
  color: var(--txa-text);
  padding: 2px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
  border: 1px solid color-mix(in srgb, var(--txa-border) 70%, transparent);
}

.badge.low {
  background: color-mix(in srgb, #22c55e 14%, var(--txa-panel));
  color: #166534;
}

.badge.normal {
  background: color-mix(in srgb, #1187f7 13%, var(--txa-panel));
  color: color-mix(in srgb, #1187f7 76%, var(--txa-text));
}

.badge.high {
  background: #fff1c7;
  color: #6e4a00;
}

.badge.urgent {
  background: #ffe0d5;
  color: #8c2b1a;
}

.badge.pending {
  background: #fff1c7;
  color: #6e4a00;
}

.badge.source-live_chat {
  background: color-mix(in srgb, #1187f7 16%, var(--txa-panel));
  color: color-mix(in srgb, #1187f7 72%, var(--txa-text));
}

.badge.source-email,
.badge.source-manual {
  background: var(--txa-soft);
  color: var(--txa-text);
}

.code-snippet {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  white-space: pre-wrap;
}

.seat-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-action {
  border: 1px solid #f1b8ac;
  border-radius: var(--txa-radius);
  background: #fff5f2;
  color: #8c2b1a;
  padding: 8px 11px;
  font-weight: 800;
  cursor: pointer;
}

.danger-action:hover {
  background: #ffe0d5;
}

.danger-action:disabled {
  cursor: progress;
  opacity: 0.7;
}

.email-template-list {
  display: grid;
  gap: 10px;
}

.email-template-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.template-picker {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  align-items: end;
  gap: 14px;
}

.template-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--txa-border) 70%, transparent);
  padding-bottom: 12px;
}

.template-heading h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.template-heading p:last-child {
  margin-bottom: 0;
}

.email-template-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.template-form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.body-toggle {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background: var(--txa-soft);
  padding: 3px;
}

.body-toggle button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--txa-text);
  padding: 4px 9px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.body-toggle button.is-active,
.body-toggle button:hover {
  background: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.subject-input {
  min-height: 38px;
  padding: 8px 10px;
}

.html-editor-shell {
  display: grid;
  gap: 8px;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--txa-border);
  border-radius: var(--txa-radius);
  background: var(--txa-soft);
  padding: 6px;
}

.wysiwyg-toolbar select,
.wysiwyg-toolbar input[type="color"],
.wysiwyg-toolbar button {
  width: auto;
  min-height: 30px;
  border: 1px solid var(--txa-input-border);
  border-radius: 6px;
  background: var(--txa-panel);
  color: var(--txa-text);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.wysiwyg-toolbar input[type="color"] {
  width: 38px;
  padding: 3px;
}

.wysiwyg-toolbar button:hover {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.wysiwyg-editor {
  min-height: 220px;
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  padding: 12px;
  overflow: auto;
}

.wysiwyg-editor:focus {
  outline: 0;
  border-color: var(--txa-highlight);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--txa-highlight) 24%, transparent);
}

.template-variables {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variable-chip {
  border: 1px solid var(--txa-input-border);
  border-radius: 999px;
  background: var(--txa-soft);
  color: var(--txa-text);
  min-height: 26px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.variable-chip:hover {
  background: var(--txa-border);
}

.ticket-detail {
  padding: 26px;
  overflow: auto;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--txa-border);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.detail-header h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.priority-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.priority-tabs button {
  min-height: 32px;
  border: 1px solid var(--txa-input-border);
  border-radius: 999px;
  background: var(--txa-panel);
  color: var(--txa-text);
  cursor: pointer;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: capitalize;
}

.priority-tabs button:hover,
.priority-tabs button.is-active {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.status-controls,
.priority-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  justify-content: flex-end;
}

.priority-controls {
  max-width: 310px;
}

.status-controls button,
.priority-controls button {
  min-height: 34px;
  border: 1px solid var(--txa-input-border);
  border-radius: var(--txa-radius);
  background: var(--txa-panel);
  color: var(--txa-text);
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 800;
  text-transform: capitalize;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.status-controls button:hover,
.status-controls button.is-active,
.priority-controls button:hover,
.priority-controls button.is-active {
  background: var(--txa-highlight);
  border-color: var(--txa-highlight);
  color: var(--txa-highlight-text);
}

.priority-controls button.low:hover,
.priority-controls button.low.is-active {
  background: #22c55e;
  border-color: #16a34a;
  color: #052e16;
}

.priority-controls button.normal:hover,
.priority-controls button.normal.is-active {
  background: #1187f7;
  border-color: #0b6fd0;
  color: #ffffff;
}

.priority-controls button.high:hover,
.priority-controls button.high.is-active {
  background: #facc15;
  border-color: #eab308;
  color: #422006;
}

.priority-controls button.urgent:hover,
.priority-controls button.urgent.is-active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

.status-controls button:hover,
.priority-controls button:hover {
  transform: translateY(-1px);
}

.message-thread {
  display: grid;
  gap: 14px;
  padding: 8px 0 4px;
}

.message {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 0;
}

.message:last-child {
  border-bottom: 0;
}

.message .ticket-meta {
  max-width: min(78%, 720px);
  padding: 0 4px;
}

.message-outgoing {
  justify-items: end;
}

.message-outgoing .ticket-meta {
  justify-content: flex-end;
}

.message-incoming pre,
.message-outgoing pre {
  position: relative;
  max-width: min(78%, 720px);
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--txa-border) 64%, transparent);
  border-radius: 18px;
  padding: 14px 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--txa-text) 8%, transparent);
}

.message-incoming pre {
  border-top-left-radius: 6px;
  border-color: color-mix(in srgb, var(--txa-incoming-accent) 68%, var(--txa-primary));
  border-left-width: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--txa-incoming-accent) 92%, var(--txa-panel)), color-mix(in srgb, var(--txa-incoming-accent) 78%, var(--txa-panel)));
  color: var(--txa-text);
}

.message-outgoing pre {
  border-color: color-mix(in srgb, var(--txa-highlight) 38%, transparent);
  border-top-right-radius: 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--txa-highlight) 92%, #ffffff), var(--txa-highlight));
  color: var(--txa-highlight-text);
}

.reply-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-top: 1px solid var(--txa-border);
  margin-top: 18px;
  padding-top: 18px;
}

.reply-form textarea {
  min-height: 128px;
}

.reply-tools {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--txa-border) 72%, transparent);
  border-radius: var(--txa-radius);
  background: var(--txa-soft);
  padding: 12px;
}

.reply-tool-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reply-tool-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.seat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--txa-border);
  padding: 14px 0;
}

.seat-row:last-child {
  border-bottom: 0;
}

.seat-row > div:first-child {
  display: grid;
  gap: 4px;
}

.seat-row > div:first-child span {
  color: var(--txa-muted);
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 320px;
  color: var(--txa-muted);
  text-align: center;
}

@media (max-width: 920px) {
  .app-shell,
  .ticket-layout,
  .config-grid,
  .subscription-grid,
  .theme-grid,
  .color-grid,
  .landing-feature-grid,
  .landing-workflow ol,
  .template-picker,
  .status-tabs,
  form {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-links {
    justify-content: flex-start;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 58px;
  }

  .hero-snapshot {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .hero-brand {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    top: auto;
    height: auto;
    min-height: auto;
  }

  .stats {
    margin-top: 0;
  }

  .toolbar,
  .detail-header,
  .subscription-overview {
    align-items: stretch;
    flex-direction: column;
  }

  .reply-tool-row,
  .reply-tool-group {
    grid-template-columns: 1fr;
  }

  .status-controls,
  .priority-controls {
    justify-content: flex-start;
    max-width: none;
  }

  .message .ticket-meta,
  .message-incoming pre,
  .message-outgoing pre {
    max-width: 100%;
  }
}
