* { box-sizing: border-box; }
:root {
  --main: #04c7f7;
  --main2: #70e8ff;
  --gold: #f6c94d;
  --red: #ff4569;
  --green: #58ffbd;
  --bg: #050812;
  --panel: rgba(8, 14, 26, .82);
  --panel2: rgba(255,255,255,.065);
  --line: rgba(255,255,255,.12);
  --line2: rgba(4,199,247,.42);
  --text: rgba(255,255,255,.96);
  --muted: rgba(255,255,255,.60);
  --muted2: rgba(255,255,255,.38);
}
html, body {
  margin: 0;
  min-height: 100%;
  background: #02040a;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Arial, sans-serif;
}
body { overflow-x: hidden; }
button, input { font-family: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none !important; }
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(2,4,10,.96), rgba(2,4,10,.55), rgba(2,4,10,.96)),
    radial-gradient(circle at 76% 12%, rgba(4,199,247,.22), transparent 28%),
    url('/assets/background.png') center/cover no-repeat fixed;
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .08;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(4,199,247,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4,199,247,.14) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 88%);
}
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 86px;
  padding: 18px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 6, 13, .74);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand { display: flex; align-items: center; gap: 13px; }
.logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--main);
  font-weight: 1000;
  letter-spacing: -1px;
  background: linear-gradient(145deg, rgba(4,199,247,.20), rgba(255,255,255,.045));
  border: 1px solid rgba(4,199,247,.45);
  box-shadow: 0 0 34px rgba(4,199,247,.18);
}
.brand b { display: block; font-size: 18px; letter-spacing: .3px; }
.brand span { display: block; color: var(--muted); font-size: 12px; font-weight: 750; margin-top: 3px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.ghost-btn, .login-btn, .danger-btn, .primary-xl, .secondary-xl {
  height: 46px;
  border-radius: 16px;
  padding: 0 18px;
  color: white;
  font-weight: 900;
  letter-spacing: .8px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.ghost-btn, .secondary-xl {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.ghost-btn:hover, .secondary-xl:hover { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.10); }
.login-btn, .primary-xl {
  background: linear-gradient(135deg, var(--main), var(--main2));
  color: #00131c;
  box-shadow: 0 0 32px rgba(4,199,247,.20);
}
.danger-btn { background: rgba(255,69,105,.16); border: 1px solid rgba(255,69,105,.38); }
.front-page, .dashboard { width: min(1480px, calc(100% - 44px)); margin: 0 auto; padding: 56px 0 80px; }
.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  display: block;
  color: var(--main);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(4,199,247,.42);
}
.hero h1, .profile-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(58px, 7vw, 108px);
  line-height: .88;
  letter-spacing: -4px;
  max-width: 920px;
}
.hero p, .profile-hero p {
  margin: 22px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 650;
}
.hero-buttons { display: flex; gap: 12px; margin-top: 30px; }
.primary-xl, .secondary-xl { height: 56px; border-radius: 19px; padding: 0 25px; font-size: 13px; text-transform: uppercase; }
.full { width: 100%; margin-top: 20px; }
.rich-card, .info-card, .panel, .staff-panel, .modal-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.035)), rgba(5,10,20,.80);
  box-shadow: 0 28px 95px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.13);
}
.rich-card {
  min-height: 360px;
  border-radius: 38px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.rich-card:before {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  right: -120px;
  top: -110px;
  background: rgba(4,199,247,.22);
}
.rich-card span, .info-card span, .panel-head span {
  color: var(--main);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}
.rich-card b { display: block; margin-top: 10px; font-size: 34px; letter-spacing: -1px; position: relative; }
.rich-card p { color: var(--muted); font-weight: 750; position: relative; }
.rank-chip {
  align-self: flex-start;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--rank);
  background: color-mix(in srgb, var(--rank) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rank) 46%, transparent);
  font-weight: 1000;
}
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 18px 0 34px; }
.stat {
  min-height: 132px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.stat.wide { grid-column: span 2; }
.stat span { color: white; font-size: 29px; font-weight: 1000; letter-spacing: -1px; }
.stat b { margin-top: 8px; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; }
.info-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 34px; }
.info-card { border-radius: 34px; padding: 28px; min-height: 270px; }
.info-card h2 { margin: 11px 0 0; font-size: 34px; letter-spacing: -1px; }
.info-card p { color: var(--muted); line-height: 1.55; font-weight: 650; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 24px; }
.feature-grid div { border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); padding: 15px; }
.feature-grid b { display: block; }
.feature-grid small { display: block; color: var(--muted); margin-top: 6px; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel { border-radius: 34px; padding: 22px; min-height: 380px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.panel-head b { font-size: 28px; letter-spacing: -1px; }
.leader-list, .activity-list, .vehicle-list { display: grid; gap: 10px; }
.leader-row, .activity-row, .vehicle-card, .search-player, .race-metric {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  background: rgba(255,255,255,.052);
  padding: 15px;
}
.leader-row, .activity-row, .vehicle-card, .search-player { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.leader-row em {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--main);
  background: rgba(4,199,247,.12);
  font-style: normal;
  font-weight: 1000;
}
.leader-row b, .activity-row b, .vehicle-card b { display: block; }
.leader-row span, .activity-row small, .vehicle-card span { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; font-weight: 750; }
.leader-row strong { margin-left: auto; color: var(--green); }
.activity-row span { color: var(--main); font-size: 11px; font-weight: 1000; letter-spacing: 1.6px; }
.profile-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.profile-hero h1 { font-size: clamp(52px, 6vw, 92px); }
.dash-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.dash-stats div { border-radius: 24px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.055); padding: 20px; min-height: 116px; display: flex; flex-direction: column; justify-content: flex-end; }
.dash-stats span { font-size: 24px; font-weight: 1000; }
.dash-stats b { color: var(--muted); margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; }
.vehicle-list { max-height: 560px; overflow-y: auto; padding-right: 5px; }
.vehicle-img { width: 74px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(4,199,247,.10); color: var(--main); font-weight: 1000; overflow: hidden; }
.vehicle-img img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card em { margin-left: auto; color: var(--main); font-style: normal; font-weight: 1000; text-transform: uppercase; font-size: 11px; }
.race-stats-box { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.race-metric b { display: block; font-size: 25px; }
.race-metric span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.3px; }
.staff-panel { margin-top: 22px; border-radius: 34px; padding: 22px; }
.log-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.log-tab { height: 42px; border-radius: 14px; padding: 0 14px; background: rgba(255,255,255,.07); color: white; border: 1px solid rgba(255,255,255,.10); font-weight: 900; }
.log-tab.active { color: #00131c; background: var(--main); }
.log-tab.disabled { opacity: .45; }
.log-tools { display: grid; grid-template-columns: 360px 1fr; gap: 14px; margin-bottom: 16px; }
.log-tools input, .modal-card input {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
  color: white;
  outline: none;
  padding: 0 16px;
  font-weight: 750;
}
.search-results { display: grid; gap: 8px; }
.logs-table { overflow: auto; max-height: 620px; border-radius: 20px; border: 1px solid rgba(255,255,255,.08); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 12px 13px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; font-size: 12px; white-space: nowrap; }
th { color: var(--main); background: rgba(4,199,247,.09); position: sticky; top: 0; z-index: 2; }
td { color: rgba(255,255,255,.76); }
.empty { border: 1px dashed rgba(255,255,255,.16); border-radius: 20px; padding: 20px; color: var(--muted); text-align: center; font-weight: 800; }
.empty.small { padding: 12px; font-size: 12px; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.62);
  padding: 20px;
}
.modal-card { width: min(470px, 100%); border-radius: 34px; padding: 30px; position: relative; }
.modal-card h2 { margin: 11px 0 0; font-size: 38px; letter-spacing: -1px; }
.modal-card p { color: var(--muted); }
.modal-card label { display: block; margin: 18px 0 8px; color: var(--main); font-size: 11px; font-weight: 1000; letter-spacing: 1.7px; text-transform: uppercase; }
.modal-close { position: absolute; right: 20px; top: 18px; width: 42px; height: 42px; border-radius: 16px; background: rgba(255,255,255,.08); color: white; font-size: 28px; border: 1px solid rgba(255,255,255,.12); }
.login-error { margin-top: 14px; padding: 13px; border-radius: 16px; background: rgba(255,69,105,.14); border: 1px solid rgba(255,69,105,.34); color: #ff93a6; text-align: center; font-weight: 850; }
@media (max-width: 1050px) {
  .nav { position: relative; height: auto; align-items: flex-start; gap: 16px; flex-direction: column; }
  .nav-actions { flex-wrap: wrap; }
  .hero, .info-grid, .split-section, .log-tools { grid-template-columns: 1fr; }
  .stats-grid, .dash-stats { grid-template-columns: repeat(2,1fr); }
  .stat.wide { grid-column: span 2; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .front-page, .dashboard { width: min(100% - 24px, 1480px); padding-top: 28px; }
  .hero h1, .profile-hero h1 { letter-spacing: -2px; }
  .stats-grid, .dash-stats, .feature-grid, .race-stats-box { grid-template-columns: 1fr; }
  .stat.wide { grid-column: span 1; }
  .profile-hero { flex-direction: column; align-items: flex-start; }
}


/* =========================================================
   DriftZone original UI fixes - kept from first good design
   ========================================================= */

/* Logo fix: hard limit, no fullscreen image possible */
.logo {
  flex: 0 0 52px;
  overflow: hidden;
  position: relative;
}
.logo img {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain !important;
  display: block;
}
.logo span {
  display: none;
}
.logo.text-logo span {
  display: block;
}

/* Page layout fixes */
.info-grid.single {
  grid-template-columns: 1fr;
}
.info-grid.single .info-card.large {
  min-height: 260px;
}
.split-section.one-panel {
  grid-template-columns: 1fr;
}
.one-panel .panel {
  min-height: 420px;
}

/* Profile / staff navigation */
.profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.staff-panel {
  background:
    linear-gradient(145deg, rgba(4,199,247,.09), rgba(255,255,255,.035)),
    var(--panel);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 18px 70px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.09);
}
.muted-line {
  color: var(--muted);
  margin: 0 0 18px;
  font-weight: 750;
}

/* Better advanced filters, without changing old visual identity */
.log-tools.advanced {
  grid-template-columns: 1fr;
  gap: 12px;
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: center;
}
.filters-grid button {
  height: 52px;
}
.log-tabs {
  padding-top: 2px;
}
.log-tab {
  transition: background .14s ease, border-color .14s ease, color .14s ease, opacity .14s ease;
}
.log-tab:hover:not(.disabled) {
  border-color: rgba(4,199,247,.48);
  background: rgba(4,199,247,.13);
}

/* Search player results */
.search-results {
  max-height: 260px;
  overflow-y: auto;
}
.search-player {
  width: 100%;
  min-height: 62px;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  color: white;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}
.search-player:hover {
  background: rgba(4,199,247,.12);
  border-color: rgba(4,199,247,.42);
}
.search-player b {
  font-size: 14px;
}
.search-player small {
  color: var(--main);
}
.search-player span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

/* Clickable UIDs in staff logs */
.uid-link {
  height: 28px;
  min-width: 54px;
  padding: 0 10px;
  border-radius: 999px;
  color: #00131c;
  background: var(--main);
  font-weight: 1000;
}

/* Triggers */
.trigger-grid {
  display: grid;
  grid-template-columns: minmax(340px, 560px) 1fr;
  gap: 18px;
}
.trigger-card {
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
}
.trigger-card span {
  display: block;
  color: var(--main);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 2px;
}
.trigger-card h2 {
  margin: 8px 0 8px;
  font-size: 34px;
  letter-spacing: -1px;
}
.trigger-card p {
  color: var(--muted);
  line-height: 1.55;
}
.trigger-card label {
  display: block;
  margin: 16px 0 7px;
  color: var(--main);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.trigger-card input {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
  color: white;
  outline: none;
  padding: 0 16px;
  font-weight: 750;
}
.login-error.success {
  background: rgba(88,255,189,.14);
  border-color: rgba(88,255,189,.34);
  color: #8fffd2;
}

/* Permissions */
.permissions-list {
  display: grid;
  gap: 14px;
}
.permission-card {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}
.permission-card b {
  display: block;
  font-size: 16px;
}
.permission-card small {
  color: var(--main);
}
.permission-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.permission-checks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.permission-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: rgba(255,255,255,.78);
  font-weight: 850;
  font-size: 12px;
}
.permission-checks input {
  accent-color: var(--main);
}

/* Minor polish */
.leader-row {
  cursor: default;
}
.leader-row[onclick] {
  cursor: pointer;
}
.leader-row:hover {
  background: rgba(4,199,247,.08);
  border-color: rgba(4,199,247,.22);
}

/* Cleaner tables */
.logs-table table {
  background: rgba(3,8,16,.32);
}
.logs-table td {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive additions */
@media (max-width: 1150px) {
  .filters-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
  .trigger-grid,
  .permission-card {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
  .logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
  .logo img {
    width: 32px !important;
    height: 32px !important;
  }
}


/* Homepage logo visibility fix
   - pe front page nu mai afisam logo-ul in navbar
   - in dashboard/profil/staff ramane disponibil normal
*/
body.front-mode .nav .logo {
  display: none !important;
}
body.front-mode .brand {
  gap: 0 !important;
}
body.dashboard-mode .nav .logo {
  display: grid !important;
}


/* Final fix: no visible logo image on front page/navbar. Favicon remains from /assets/logo.png. */
.brand .logo,
.brand img,
.front-page .logo,
.front-page img[src*="logo"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
}

.brand.brand-text-only {
  display: flex;
  align-items: center;
  gap: 0;
}

/* =========================================================
   Web Support Tickets + Level Permissions
   ========================================================= */
.support-panel {
  min-height: 720px;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(310px, 380px) 1fr;
  gap: 18px;
  align-items: stretch;
}

.support-left,
.support-conversation {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 28px rgba(255,255,255,.018);
}

.support-left {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 660px;
}

.support-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.support-create {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(4,199,247,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(4,199,247,.20);
}

.support-create span {
  color: var(--main);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 2px;
}

.support-create input,
.support-create textarea,
.ticket-reply input,
.ticket-reply textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(5,10,18,.72);
  color: #fff;
  border-radius: 16px;
  outline: 0;
  padding: 13px 14px;
  font: inherit;
  font-weight: 700;
}

.support-create textarea,
.ticket-reply textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

.ticket-list {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 4px;
}

.ticket-list::-webkit-scrollbar,
.ticket-messages::-webkit-scrollbar {
  width: 5px;
}

.ticket-list::-webkit-scrollbar-thumb,
.ticket-messages::-webkit-scrollbar-thumb {
  background: var(--main);
  border-radius: 99px;
}

.ticket-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 19px;
  background: rgba(255,255,255,.052);
  color: white;
  text-align: left;
  padding: 13px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.ticket-card:hover,
.ticket-card.active {
  border-color: rgba(4,199,247,.45);
  background: rgba(4,199,247,.12);
  box-shadow: 0 0 22px rgba(4,199,247,.09);
}

.ticket-card b {
  display: block;
  font-size: 14px;
}

.ticket-card span,
.ticket-card small {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  margin-top: 4px;
}

.ticket-status {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(4,199,247,.13);
  border: 1px solid rgba(4,199,247,.28);
  color: var(--main);
  font-style: normal;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1.2px;
}

.ticket-status.closed,
.ticket-status.deleted {
  color: rgba(255,255,255,.68);
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}

.ticket-status.accepted {
  color: #58ffbd;
  border-color: rgba(88,255,189,.32);
  background: rgba(88,255,189,.10);
}

.support-conversation {
  min-height: 660px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}

.ticket-thread-head span {
  color: var(--main);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1.8px;
}

.ticket-thread-head b {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.ticket-thread-head p {
  margin: 6px 0 0;
  color: rgba(255,255,255,.60);
}

.ticket-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-messages {
  flex: 1;
  min-height: 260px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 6px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.ticket-message {
  width: min(720px, 88%);
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
}

.ticket-message.mine {
  justify-self: end;
  border-color: rgba(4,199,247,.28);
  background: rgba(4,199,247,.10);
}

.ticket-message div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.78);
}

.ticket-message span {
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

.ticket-message p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.82);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-message a,
.ticket-attachment {
  color: var(--main);
  font-weight: 900;
  text-decoration: none;
}

.ticket-attachment {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(4,199,247,.10);
  border: 1px solid rgba(4,199,247,.24);
}

.ticket-reply {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
}

.permission-card[data-level] > div:first-child b {
  font-size: 20px;
}

.permission-card[data-level] > div:first-child span {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.56);
  font-weight: 700;
}

.permission-card input:disabled + span,
.permission-card label:has(input:disabled) {
  opacity: .65;
}

@media (max-width: 980px) {
  .support-layout {
    grid-template-columns: 1fr;
  }
  .support-left,
  .support-conversation {
    min-height: auto;
  }
}
