@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Uncial+Antiqua&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

:root {
  --text: #f3f5f7;
  --muted: #bac7da;
  --line: #37506f;
  --radius: 16px;
  --shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Cinzel", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.45;
  background-color: #0a111b;
}

a {
  color: #a8d6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
}

.brand {
  letter-spacing: 0.06em;
  font-weight: 700;
}

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

.container {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.card h1 {
  font-size: 1.7rem;
}

.card h2 {
  font-size: 1.28rem;
}

.card h3 {
  font-size: 1.02rem;
}

.muted {
  color: var(--muted);
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
}

.stat-value {
  display: block;
  font-size: 1.24rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.91rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

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

.ticket-card {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.reply {
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid;
}

.footer {
  text-align: center;
  margin: 24px 0;
  font-size: 0.88rem;
}

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

.kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.kpi span {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.kpi strong {
  display: block;
  font-size: 0.94rem;
}

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

.filter-grid .filter-text {
  grid-column: span 2;
}

.filter-actions {
  align-self: end;
}

.pager {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.raw-line {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.76rem;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.42;
}

.mono-line {
  word-break: break-all;
}

.container > * {
  animation: fade-lift 0.45s ease both;
}

.container > *:nth-child(2) {
  animation-delay: 0.08s;
}

.container > *:nth-child(3) {
  animation-delay: 0.14s;
}

@keyframes fade-lift {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.theme-player {
  background:
    radial-gradient(1050px 620px at 14% -12%, rgba(120, 178, 228, 0.24), transparent 58%),
    radial-gradient(940px 560px at 90% 2%, rgba(68, 106, 182, 0.3), transparent 62%),
    linear-gradient(180deg, rgba(6, 12, 21, 0.88), rgba(7, 14, 24, 0.94)),
    url("../img/wotlk-player.jpg") center top / cover fixed no-repeat;
}

body.theme-player .topbar {
  background: linear-gradient(180deg, rgba(8, 15, 26, 0.95), rgba(9, 17, 29, 0.9));
  border-bottom: 1px solid #475f7e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

body.theme-player .brand {
  font-family: "Uncial Antiqua", "Cinzel", serif;
  font-size: 1.02rem;
  color: #f7efe0;
  text-shadow: 0 0 10px rgba(205, 172, 103, 0.38);
}

body.theme-player .card {
  border-color: rgba(119, 144, 178, 0.52);
  background:
    linear-gradient(150deg, rgba(216, 178, 103, 0.07), rgba(96, 145, 201, 0.08) 42%, rgba(18, 27, 39, 0.6)),
    rgba(10, 16, 26, 0.82);
}

body.theme-player .card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209, 175, 110, 0.6), transparent);
  pointer-events: none;
}

body.theme-player .hero > .card:first-child {
  min-height: 318px;
  overflow: hidden;
}

body.theme-player .hero > .card:first-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(9, 17, 29, 0.8), rgba(14, 22, 34, 0.44) 45%, rgba(23, 36, 55, 0.75)),
    url("../img/wotlk-player.jpg") center / cover no-repeat;
  opacity: 0.26;
  pointer-events: none;
}

body.theme-player .hero > .card:first-child > * {
  position: relative;
  z-index: 1;
}

body.theme-player .stat {
  border-color: rgba(94, 131, 173, 0.62);
  background: linear-gradient(180deg, rgba(24, 36, 55, 0.85), rgba(11, 18, 30, 0.95));
}

body.theme-player .btn-primary {
  color: #f5f8ff;
  border-color: #6f8bb1;
  background: linear-gradient(180deg, #3d6ea5, #2a527f);
}

body.theme-player .btn-secondary {
  color: #ecf3ff;
  border-color: #85704a;
  background: linear-gradient(180deg, #625233, #463925);
}

body.theme-player .btn-danger {
  color: #fff2f2;
  border-color: #b76f75;
  background: linear-gradient(180deg, #95434c, #6f2f37);
}

body.theme-player .btn-success {
  color: #effff4;
  border-color: #6ca37d;
  background: linear-gradient(180deg, #2f7d54, #255e40);
}

body.theme-player .btn-warning {
  color: #fff8ea;
  border-color: #c89b54;
  background: linear-gradient(180deg, #9a7535, #745425);
}

body.theme-player .btn-ghost {
  color: #cce0ff;
  border-color: #5a7699;
  background: rgba(18, 30, 46, 0.55);
}

body.theme-player .badge-user {
  color: #d5ebff;
  border-color: #658bb9;
  background: rgba(31, 61, 96, 0.52);
}

body.theme-player .badge-admin {
  color: #ffe8d0;
  border-color: #a98045;
  background: rgba(99, 66, 23, 0.58);
}

body.theme-player .badge-owner {
  color: #e8f6cf;
  border-color: #80a45d;
  background: rgba(46, 72, 30, 0.62);
}

body.theme-player .badge-open {
  color: #d9eaff;
  border-color: #6287bd;
  background: rgba(36, 61, 98, 0.64);
}

body.theme-player .badge-waiting {
  color: #ffecc9;
  border-color: #b58d4e;
  background: rgba(98, 73, 33, 0.67);
}

body.theme-player .badge-answered {
  color: #dcffe6;
  border-color: #5f9b73;
  background: rgba(30, 72, 48, 0.67);
}

body.theme-player input[type="text"],
body.theme-player input[type="password"],
body.theme-player input[type="email"],
body.theme-player select,
body.theme-player textarea {
  color: #ebf4ff;
  border: 1px solid #4f6888;
  background: rgba(10, 19, 31, 0.84);
}

body.theme-player input:focus,
body.theme-player select:focus,
body.theme-player textarea:focus {
  border-color: #7fa3d4;
  box-shadow: 0 0 0 3px rgba(127, 163, 212, 0.25);
}

body.theme-player th {
  color: #d0def2;
  border-bottom: 1px solid #4e6787;
}

body.theme-player td {
  border-bottom: 1px solid #32455f;
}

body.theme-player .ticket-card {
  border: 1px solid #4f6889;
  background: rgba(18, 31, 47, 0.74);
}

body.theme-player .reply {
  border: 1px solid #446283;
  background: rgba(16, 26, 41, 0.88);
}

body.theme-player .reply-admin {
  border-left: 3px solid #d4aa60;
}

body.theme-player .notice-success {
  color: #ceffdf;
  border-color: #649d7a;
  background: rgba(35, 82, 55, 0.38);
}

body.theme-player .notice-error {
  color: #ffd8db;
  border-color: #ae5b66;
  background: rgba(112, 47, 57, 0.36);
}

body.theme-player .notice-info {
  color: #dcecff;
  border-color: #5f83b1;
  background: rgba(43, 66, 102, 0.38);
}

body.theme-player .footer {
  color: #99afca;
  text-shadow: 0 0 8px rgba(7, 14, 24, 0.7);
}

body.theme-player .realm-modules .card {
  min-height: 172px;
}

body.theme-player .kpi {
  border-color: #50719b;
  background: rgba(17, 28, 43, 0.82);
}

body.theme-admin {
  color: #d6ddd7;
  font-family: "IBM Plex Mono", "Consolas", "Courier New", monospace;
  letter-spacing: 0.01em;
  background:
    repeating-linear-gradient(0deg, rgba(114, 141, 120, 0.08) 0, rgba(114, 141, 120, 0.08) 1px, transparent 1px, transparent 17px),
    radial-gradient(980px 580px at 88% -8%, rgba(47, 72, 57, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(8, 13, 10, 0.93), rgba(7, 10, 8, 0.97)),
    url("../img/wotlk-admin.jpg") center center / cover fixed no-repeat;
}

body.theme-admin.admin-dashboard {
  overflow-x: hidden;
}

body.theme-admin .cipher-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

body.theme-admin .admin-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(850px 420px at 50% 18%, rgba(95, 130, 103, 0.14), transparent 68%),
    rgba(4, 8, 6, 0.94);
}

body.theme-admin .admin-boot-overlay.is-complete {
  animation: boot-fade 0.8s forwards;
}

body.theme-admin .boot-panel {
  width: min(760px, 92vw);
  border: 1px solid #3c4f43;
  background: rgba(7, 11, 9, 0.95);
  box-shadow: 0 0 0 1px rgba(21, 31, 26, 0.8), 0 14px 28px rgba(0, 0, 0, 0.62);
  padding: 16px;
}

body.theme-admin .boot-panel h2 {
  margin: 0 0 8px;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.theme-admin .boot-progress {
  height: 10px;
  background: rgba(15, 21, 17, 0.92);
  border: 1px solid #35473b;
  margin: 12px 0;
  overflow: hidden;
}

body.theme-admin .boot-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #375a45, #7fb48a);
  box-shadow: 0 0 12px rgba(133, 186, 145, 0.4);
  transition: width 0.2s ease;
}

body.theme-admin .boot-log {
  max-height: 140px;
  overflow-y: auto;
  border: 1px solid #2f3f35;
  background: rgba(9, 14, 11, 0.92);
  padding: 8px;
  font-size: 0.73rem;
  line-height: 1.35;
}

body.theme-admin .boot-log div {
  color: #b4c6b9;
  opacity: 0.92;
}

body.theme-admin main.container {
  position: relative;
  z-index: 2;
}

body.theme-admin a {
  color: #c0f0ce;
}

body.theme-admin .topbar {
  background: rgba(6, 10, 8, 0.95);
  border-bottom: 1px solid #37483d;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.56);
}

body.theme-admin .topbar-inner {
  max-width: 1420px;
  gap: 10px;
  padding: 10px 14px;
}

body.theme-admin .brand {
  color: #dfebe3;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
}

body.theme-admin .container {
  max-width: 1420px;
  margin: 16px auto;
  padding: 0 14px;
}

body.theme-admin .card {
  border-color: #334237;
  border-radius: 2px;
  padding: 14px 12px;
  background:
    linear-gradient(180deg, rgba(150, 174, 151, 0.08), rgba(0, 0, 0, 0)),
    rgba(8, 12, 9, 0.9);
  box-shadow: 0 0 0 1px rgba(16, 22, 18, 0.75), 0 14px 30px rgba(0, 0, 0, 0.52);
}

body.theme-admin .card::before {
  content: "///";
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: rgba(152, 175, 158, 0.45);
}

body.theme-admin .card h1,
body.theme-admin .card h2,
body.theme-admin .card h3 {
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

body.theme-admin .card h1 {
  font-size: 1rem;
}

body.theme-admin .card h2 {
  font-size: 0.92rem;
}

body.theme-admin .card h3 {
  font-size: 0.84rem;
}

body.theme-admin .muted {
  color: #a3b1a6;
}

body.theme-admin .stats {
  gap: 8px;
}

body.theme-admin .stat {
  border-color: #3a4b3f;
  border-radius: 2px;
  padding: 8px 9px;
  background: rgba(9, 13, 10, 0.94);
}

body.theme-admin .stat-value {
  font-size: 0.92rem;
}

body.theme-admin .btn {
  border-radius: 1px;
  padding: 7px 9px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.theme-admin .btn-primary {
  color: #e6ffee;
  border-color: #588064;
  background: #193227;
}

body.theme-admin .btn-secondary {
  color: #d8dfd9;
  border-color: #4c5d51;
  background: #151b16;
}

body.theme-admin .btn-danger {
  color: #ffe8e8;
  border-color: #956568;
  background: #412226;
}

body.theme-admin .btn-success {
  color: #eaffef;
  border-color: #5d8e6a;
  background: #22432e;
}

body.theme-admin .btn-warning {
  color: #fff5de;
  border-color: #997f52;
  background: #574724;
}

body.theme-admin .btn-ghost {
  color: #d2dfd4;
  border-color: #4a5b4e;
  background: rgba(17, 23, 18, 0.8);
}

body.theme-admin .badge {
  border-radius: 2px;
  text-transform: uppercase;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

body.theme-admin .badge-user {
  color: #d6e5da;
  border-color: #4b6051;
  background: #142019;
}

body.theme-admin .badge-admin {
  color: #fbf0d9;
  border-color: #746144;
  background: #2b2416;
}

body.theme-admin .badge-owner {
  color: #e6f4da;
  border-color: #63805b;
  background: #223120;
}

body.theme-admin .badge-open {
  color: #d4e5da;
  border-color: #476256;
  background: #17231c;
}

body.theme-admin .badge-waiting {
  color: #f6ebd6;
  border-color: #7a6846;
  background: #312718;
}

body.theme-admin .badge-answered {
  color: #dcf0e0;
  border-color: #527660;
  background: #1f3125;
}

body.theme-admin input[type="text"],
body.theme-admin input[type="password"],
body.theme-admin input[type="email"],
body.theme-admin select,
body.theme-admin textarea {
  color: #e1e9e3;
  border: 1px solid #3a4c40;
  border-radius: 2px;
  padding: 8px 9px;
  background: #0a0f0b;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.82rem;
}

body.theme-admin input:focus,
body.theme-admin select:focus,
body.theme-admin textarea:focus {
  border-color: #719479;
  box-shadow: 0 0 0 2px rgba(88, 118, 96, 0.35);
}

body.theme-admin .table-wrap {
  border: 1px solid #2f3e34;
  border-radius: 0;
  background: rgba(9, 13, 10, 0.95);
}

body.theme-admin th {
  border-bottom: 1px solid #394b3f;
  color: #bccabc;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(108, 128, 114, 0.14);
}

body.theme-admin td {
  border-bottom: 1px solid #26342b;
  font-size: 0.8rem;
}

body.theme-admin tbody tr:nth-child(even) {
  background: rgba(22, 30, 25, 0.42);
}

body.theme-admin .ticket-card {
  border: 1px solid #37483d;
  border-radius: 1px;
  padding: 10px;
  background: rgba(12, 18, 14, 0.92);
}

body.theme-admin .reply {
  border: 1px solid #334338;
  border-radius: 1px;
  background: rgba(12, 18, 14, 0.92);
}

body.theme-admin .reply-admin {
  border-left: 4px solid #89a88f;
}

body.theme-admin .notice-success {
  color: #d6eedb;
  border-color: #527362;
  background: rgba(29, 51, 37, 0.48);
}

body.theme-admin .notice-error {
  color: #ffdddd;
  border-color: #7b585d;
  background: rgba(66, 35, 39, 0.52);
}

body.theme-admin .notice-info {
  color: #d9ebe0;
  border-color: #556d60;
  background: rgba(35, 52, 44, 0.5);
}

body.theme-admin .admin-chaos-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 10px;
}

body.theme-admin .chaos-panel {
  border: 1px dashed #405246;
  padding: 10px;
  min-height: 230px;
  background: rgba(10, 14, 11, 0.9);
}

body.theme-admin .process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

body.theme-admin .process-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid #2f4136;
  background: rgba(13, 19, 15, 0.9);
  padding: 7px 8px;
  font-size: 0.74rem;
}

body.theme-admin .process-list li span {
  color: #b1c1b5;
}

body.theme-admin .state {
  padding: 2px 5px;
  border-radius: 1px;
  border: 1px solid;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

body.theme-admin .state-ok {
  color: #d7f0dd;
  border-color: #537861;
  background: rgba(31, 54, 39, 0.65);
}

body.theme-admin .state-warn {
  color: #f9edd6;
  border-color: #7b6a45;
  background: rgba(58, 45, 23, 0.7);
}

body.theme-admin .state-err {
  color: #ffdede;
  border-color: #80585d;
  background: rgba(67, 35, 39, 0.68);
}

body.theme-admin .state-pend {
  color: #d9ece1;
  border-color: #59796a;
  background: rgba(30, 48, 40, 0.66);
}

body.theme-admin .graph-grid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  border: 1px solid #314338;
  background:
    linear-gradient(180deg, rgba(110, 140, 119, 0.08), transparent),
    rgba(10, 15, 11, 0.92);
  min-height: 150px;
  max-height: 150px;
  padding: 8px;
}

body.theme-admin .flux-bar {
  display: block;
  min-height: 8px;
  border: 1px solid #4e6a58;
  background: linear-gradient(180deg, #77a286, #274334);
  transition: height 0.36s ease, opacity 0.36s ease, transform 0.36s ease;
}

body.theme-admin .flux-bar.is-hot {
  border-color: #86a48d;
  background: linear-gradient(180deg, #b7cb84, #4f6738);
}

body.theme-admin .tiny-actions {
  margin-top: 8px;
}

body.theme-admin .tiny-actions .badge {
  display: inline-flex;
  gap: 6px;
}

body.theme-admin input[type="range"] {
  accent-color: #7aa286;
  height: 6px;
  padding: 0;
}

body.theme-admin .relay-feed {
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid #32443a;
  background:
    repeating-linear-gradient(0deg, rgba(96, 125, 104, 0.06) 0, rgba(96, 125, 104, 0.06) 1px, transparent 1px, transparent 18px),
    rgba(8, 12, 10, 0.95);
  padding: 8px;
  font-size: 0.74rem;
  line-height: 1.35;
}

body.theme-admin .relay-line {
  color: #a9b8ad;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(90, 111, 97, 0.3);
}

body.theme-admin .kpi {
  border-color: #394a3f;
  border-radius: 1px;
  background: rgba(10, 14, 11, 0.92);
}

body.theme-admin .kpi strong {
  color: #dbe9de;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.theme-admin .filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.theme-admin .filter-grid .filter-text {
  grid-column: span 2;
}

body.theme-admin .pager {
  border-top: 1px solid #314036;
  padding-top: 10px;
}

body.theme-admin .raw-line {
  color: #b7cabd;
}

body.theme-admin.admin-gm-logs .table-wrap {
  max-height: 68vh;
  overflow-y: auto;
}

body.theme-admin .footer {
  color: #8d9a90;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-main {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid .filter-text {
    grid-column: span 1;
  }

  body.theme-admin .admin-chaos-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .btn {
    flex: 1 1 auto;
  }
}

@keyframes boot-fade {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .container > * {
    animation: none;
  }

  .btn {
    transition: none;
  }
}

/* Ticket UX extensions */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(7, 12, 20, 0.92);
  z-index: 200;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.loading-screen.admin-loader {
  background: rgba(6, 10, 8, 0.94);
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(148, 178, 216, 0.35);
  border-top-color: rgba(227, 239, 255, 0.95);
  animation: spin-ring 0.85s linear infinite;
}

.loading-text {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c6d9f3;
}

.ticket-unread-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #6488ba;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ddecff;
  background: rgba(38, 64, 101, 0.55);
}

.ticket-unread-chip.status-open {
  border-color: #5e88c6;
  background: rgba(35, 59, 93, 0.52);
  color: #d5e8ff;
}

.ticket-unread-chip.status-waiting {
  border-color: #b69154;
  background: rgba(84, 62, 27, 0.5);
  color: #ffe9c1;
}

.ticket-unread-chip.status-closed {
  border-color: #7b858f;
  background: rgba(45, 52, 59, 0.5);
  color: #d7dde4;
}

.pulse-unread {
  animation: pulse-unread 1.2s ease-in-out infinite;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7ec7ff;
  box-shadow: 0 0 10px rgba(126, 199, 255, 0.85);
  animation: pulse-dot 1.25s ease-in-out infinite;
}

.ticket-status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ticket-status-pill.status-open,
.ticket-card.status-open {
  border-color: #5e88c6;
  background: rgba(35, 59, 93, 0.45);
  color: #d5e8ff;
}

.ticket-status-pill.status-waiting,
.ticket-card.status-waiting {
  border-color: #b69154;
  background: rgba(84, 62, 27, 0.42);
  color: #ffe9c1;
}

.ticket-status-pill.status-answered,
.ticket-card.status-answered {
  border-color: #72c08a;
  background: rgba(38, 92, 59, 0.58);
  color: #e3ffec;
  box-shadow: 0 0 0 1px rgba(114, 192, 138, 0.28), 0 0 14px rgba(85, 170, 113, 0.16);
}

.ticket-status-pill.status-closed,
.ticket-card.status-closed {
  border-color: #7b858f;
  background: rgba(45, 52, 59, 0.42);
  color: #d7dde4;
}

.ticket-card.ticket-unread {
  box-shadow: 0 0 0 1px rgba(127, 194, 255, 0.35), 0 0 18px rgba(127, 194, 255, 0.18);
}

.ticket-list-wrap {
  display: grid;
  gap: 10px;
}

.ticket-list-card {
  max-height: 72vh;
  overflow-y: auto;
}

.ticket-card {
  border: 1px solid;
  border-radius: 12px;
  padding: 12px;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

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

.ticket-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ticket-meta {
  font-size: 0.83rem;
  margin-top: 4px;
}

.ticket-row-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-create-form.is-disabled {
  opacity: 0.58;
}

.reply-timeline {
  display: grid;
  gap: 10px;
}

.protocol-note {
  border-left: 4px solid #8ab1d8;
}

.activity-stream {
  max-height: 340px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.activity-line {
  border: 1px solid #3f5246;
  background: rgba(10, 15, 12, 0.85);
  padding: 8px;
  border-radius: 2px;
  font-size: 0.78rem;
}

.admin-ticket-toolgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.admin-ticket-toolgrid > .card {
  margin: 0;
}

.admin-ticket-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.support-hero {
  overflow: hidden;
}

.support-grid {
  align-items: start;
}

.card-empty {
  border-style: dashed;
}

@keyframes pulse-unread {
  0% { box-shadow: 0 0 0 0 rgba(116, 183, 255, 0.45); }
  70% { box-shadow: 0 0 0 11px rgba(116, 183, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(116, 183, 255, 0); }
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(1); opacity: 0.85; }
}

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .admin-ticket-toolgrid {
    grid-template-columns: 1fr;
  }

  .admin-ticket-filters {
    grid-template-columns: 1fr;
  }
}
