/* BLACXTONE role workspaces — shared premium visual system. */
:root {
  --workspace-bg: #edf0eb;
  --workspace-surface: rgba(255, 254, 249, .93);
  --workspace-ink: #111915;
  --workspace-muted: #6d7770;
  --workspace-line: rgba(12, 30, 22, .09);
  --workspace-dark: #07120f;
  --accent: #b99359;
  --accent-strong: #80602f;
  --accent-rgb: 185, 147, 89;
  --positive: #13704c;
  --danger: #a84b44;
  --elevated-shadow: 0 18px 50px rgba(15, 31, 23, .07);
}

body[data-portal="client"] {
  --accent: #b99359;
  --accent-strong: #80602f;
  --accent-rgb: 185, 147, 89;
}

body[data-portal="support"] {
  --accent: #68a9a1;
  --accent-strong: #31756d;
  --accent-rgb: 104, 169, 161;
}

body[data-portal="admin"] {
  --accent: #a37f70;
  --accent-strong: #754d3f;
  --accent-rgb: 163, 127, 112;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--workspace-bg); }

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--workspace-ink);
  background:
    radial-gradient(circle at 82% -10%, rgba(var(--accent-rgb), .13), transparent 31%),
    linear-gradient(135deg, #f1f3ef, #e9ece7);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(10, 31, 22, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 31, 22, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

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

button { transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, background .2s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .19); outline-offset: 2px; }

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: auto;
  height: 100vh;
  min-height: 620px;
  padding: 30px 22px 24px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 14% 2%, rgba(var(--accent-rgb), .22), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(var(--accent-rgb), .07), transparent 35%),
    linear-gradient(160deg, #0b2018 0%, var(--workspace-dark) 58%, #040a08 100%);
  border-right: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 14px 0 50px rgba(4, 13, 9, .07);
}

.sidebar::before {
  content: "B";
  position: absolute;
  right: -42px;
  bottom: 50px;
  color: transparent;
  font: italic 255px/.8 Georgia, serif;
  -webkit-text-stroke: 1px rgba(var(--accent-rgb), .07);
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 22%;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.side-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 7px;
  color: #f2f5f2;
  font: 600 16px/1 Georgia, serif;
  letter-spacing: .1em;
}

.side-brand small {
  display: block;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .36);
  font: 700 6px/1 Inter, sans-serif;
  letter-spacing: .22em;
}

.side-mark {
  position: relative;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--accent-rgb), .7);
  border-radius: 50%;
  color: var(--accent);
  font: italic 27px/1 Georgia, serif;
}

.side-mark::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .9);
}

.workspace-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 38px 4px 10px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.workspace-meta > i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #63c08e;
  box-shadow: 0 0 14px #63c08e;
}

.workspace-meta div { display: grid; gap: 4px; }
.workspace-meta small { color: rgba(255, 255, 255, .28); font-size: 6px; font-weight: 800; letter-spacing: .19em; }
.workspace-meta b { color: rgba(255, 255, 255, .77); font-size: 10px; font-weight: 600; letter-spacing: .04em; }

.nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin-top: 24px;
}

.nav::before {
  content: "NAVIGATION";
  margin: 0 12px 10px;
  color: rgba(255, 255, 255, .22);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .24em;
}

.nav button {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(222, 233, 226, .54);
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
}

.nav button::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 99px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(.2);
  transition: opacity .2s ease, transform .2s ease;
}

.nav button:hover {
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .035);
  transform: translateX(2px);
}

.nav button.active {
  border-color: rgba(var(--accent-rgb), .14);
  color: #fff;
  background: linear-gradient(100deg, rgba(var(--accent-rgb), .17), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 25px rgba(0, 0, 0, .12);
}

.nav button.active::after { opacity: 1; transform: scaleY(1); }

.nav-index {
  color: rgba(var(--accent-rgb), .62);
  font: 600 7px/1 Georgia, serif;
  letter-spacing: .06em;
}

.nav button.active .nav-index { color: var(--accent); }
.nav button i { color: rgba(255, 255, 255, .16); font-size: 16px; font-style: normal; }
.nav button.active i { color: var(--accent); }

.side-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.sim-badge {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: 13px;
  color: inherit;
  background: rgba(var(--accent-rgb), .055);
}

.sim-badge > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--accent-rgb), .4);
  border-radius: 50%;
  color: var(--accent);
  font-size: 6px;
  font-weight: 800;
}

.sim-badge div { display: grid; gap: 4px; }
.sim-badge b { color: rgba(255, 255, 255, .74); font-size: 9px; font-weight: 600; }
.sim-badge small { color: rgba(255, 255, 255, .33); font-size: 7px; }
.side-footer > p { margin: 16px 4px 0; color: rgba(255, 255, 255, .19); font-size: 6px; letter-spacing: .12em; }

.content {
  position: relative;
  width: 100%;
  max-width: 1700px;
  min-width: 0;
  margin: 0 auto;
  padding: 34px clamp(28px, 4vw, 68px) 72px;
}

.content::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 36vw);
  height: 1px;
  background: linear-gradient(to left, rgba(var(--accent-rgb), .75), transparent);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  margin-bottom: 36px;
  padding-bottom: 27px;
  border-bottom: 1px solid rgba(12, 30, 22, .085);
}

.topbar-copy { min-width: 0; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--workspace-muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .17em;
}

.breadcrumb span:first-child { color: var(--accent-strong); }
.breadcrumb i { color: rgba(12, 30, 22, .23); font-style: normal; }

.topbar h1 {
  margin: 12px 0 7px;
  color: #111a16;
  font: 400 clamp(32px, 3vw, 48px)/1 Georgia, "Songti SC", serif;
  letter-spacing: -.045em;
}

.topbar-copy > p {
  margin: 0;
  color: rgba(24, 45, 35, .34);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .22em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(12, 30, 22, .08);
  border-radius: 999px;
  color: #6d7b73;
  background: rgba(255, 255, 255, .48);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .14em;
}

.system-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3cb474;
  box-shadow: 0 0 10px rgba(60, 180, 116, .8);
}

.user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border: 1px solid rgba(12, 30, 22, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 8px 24px rgba(12, 30, 22, .035);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .5);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #173c2e, #091b14);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
  font: 500 16px/1 Georgia, serif;
}

.user-name { display: grid; gap: 3px; color: #28352e; font-size: 10px; font-weight: 700; }
.user-name small { color: #96a098; font-size: 5px; letter-spacing: .16em; }

.logout-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(12, 30, 22, .08);
  border-radius: 50%;
  overflow: hidden;
  color: transparent !important;
  background: rgba(255, 255, 255, .52) !important;
  box-shadow: none;
}

.logout-button::before {
  content: "↗";
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #66726b;
  font-size: 14px;
  transform: rotate(45deg);
}

.logout-button:hover { border-color: rgba(168, 75, 68, .25); background: rgba(168, 75, 68, .07) !important; }
.logout-button:hover::before { color: var(--danger); }

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

.card {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(12, 30, 22, .075);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), transparent 35%),
    var(--workspace-surface);
  box-shadow: var(--elevated-shadow), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  border-color: rgba(var(--accent-rgb), .18);
  box-shadow: 0 24px 65px rgba(15, 31, 23, .095), inset 0 1px 0 #fff;
}

.card.wide { grid-column: span 8; }
.card.full { grid-column: 1 / -1; }

.card.stat {
  min-height: 165px;
  padding: 26px;
}

.card.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  width: 42px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .48);
}

.card.stat::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(var(--accent-rgb), .1);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(var(--accent-rgb), .035);
}

.stat .label,
.tiny {
  color: var(--workspace-muted);
  font-size: 10px;
  letter-spacing: .025em;
}

.stat .value {
  position: relative;
  z-index: 1;
  margin: 23px 0 9px;
  color: #10231a;
  font: 400 clamp(30px, 2.6vw, 42px)/1 Georgia, serif;
  letter-spacing: -.035em;
}

.positive { color: var(--positive) !important; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title h3,
.card > h3 {
  margin: 0;
  color: #16221c;
  font: 400 22px/1.2 Georgia, "Songti SC", serif;
  letter-spacing: -.025em;
}

.section-title button,
.card > button,
.product button,
.chat-form button,
.modal-card button,
#settingsForm button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(var(--accent-rgb), .12);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #17402f, #0a251a);
  box-shadow: 0 8px 18px rgba(10, 48, 32, .12);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}

button.secondary {
  border: 1px solid rgba(12, 30, 22, .08);
  color: #385146;
  background: #edf0eb;
  box-shadow: none;
}

button.danger { background: linear-gradient(135deg, #af574e, #8d3c36); }

.table-wrap {
  margin: 0 -6px -5px;
  overflow: auto;
  border-radius: 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 11px; }

thead { background: rgba(20, 55, 40, .025); }

th,
td {
  padding: 15px 13px;
  border-bottom: 1px solid var(--workspace-line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #89928c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
}

td { color: #37443d; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(var(--accent-rgb), .045); }
tbody tr:last-child td { border-bottom: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(19, 112, 76, .1);
  border-radius: 999px;
  color: #166447;
  background: rgba(73, 164, 119, .095);
  font-size: 8px;
  font-weight: 700;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3cb474;
}

.pill.closed { border-color: rgba(70, 70, 70, .08); color: #777; background: #eee; }
.pill.closed::before { background: #9b9b9b; }
.pill.pending { border-color: rgba(166, 116, 36, .14); color: #805f24; background: rgba(206, 162, 78, .12); }
.pill.pending::before { background: #c6943e; }

.sim-only {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(var(--accent-rgb), .16);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(var(--accent-rgb), .055);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
}

.topup-notice {
  margin-bottom: 22px;
  padding: 17px 18px;
  border: 1px solid rgba(166, 116, 36, .16);
  border-radius: 13px;
  color: #5e4d29;
  background: linear-gradient(135deg, rgba(218, 183, 111, .13), rgba(255, 255, 255, .58));
}

.topup-notice b { display: block; margin-bottom: 6px; color: #4b3a19; font: 500 14px/1.3 Georgia, "Songti SC", serif; }
.topup-notice p { margin: 0; font-size: 10px; line-height: 1.75; }

.topup-form { display: grid; gap: 15px; }
.topup-form label { display: grid; gap: 7px; color: #445048; font-size: 10px; }
.topup-form button,
.topup-actions button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(var(--accent-rgb), .12);
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #17402f, #0a251a);
  box-shadow: 0 8px 18px rgba(10, 48, 32, .12);
  font-size: 9px;
  font-weight: 700;
}

.topup-form button:disabled { cursor: not-allowed; opacity: .5; }
.topup-actions { display: inline-flex; gap: 7px; }
.topup-actions button { min-height: 30px; padding: 0 10px; box-shadow: none; }
.topup-actions button.danger { background: linear-gradient(135deg, #af574e, #8d3c36); }

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

.product {
  position: relative;
  min-height: 255px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(12, 30, 22, .08);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .12), transparent 34%),
    rgba(255, 255, 255, .62);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.product::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(var(--accent-rgb), .14);
  border-radius: 50%;
}

.product:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .25);
  box-shadow: 0 18px 38px rgba(13, 36, 25, .09);
}

.product .eyebrow {
  color: var(--accent-strong);
  font-size: 7px;
  letter-spacing: .2em;
}

.product h4 { margin: 12px 0 22px; color: #1b2922; font: 500 15px/1.3 Georgia, "Songti SC", serif; }
.product .rate { color: #143e2c; font: 400 37px/1 Georgia, serif; letter-spacing: -.035em; }
.product .tiny { min-height: 32px; margin: 11px 0 18px; line-height: 1.6; }
.product button { width: 100%; }

.field,
.login-card input,
input,
textarea,
select {
  border: 1px solid rgba(12, 30, 22, .11);
  border-radius: 10px;
  outline: none;
  color: #26362e;
  background: rgba(255, 255, 255, .72);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(var(--accent-rgb), .65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .08);
}

label { color: #566159; font-size: 10px; font-weight: 600; }

.row { display: flex; align-items: center; gap: 10px; }
.row > * { flex: 1; }

.ticket-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 235px);
  min-height: 520px;
}

.ticket-list,
.chat {
  overflow: hidden;
  border: 1px solid rgba(12, 30, 22, .08);
  border-radius: 18px;
  background: var(--workspace-surface);
  box-shadow: var(--elevated-shadow);
}

.ticket-list { overflow-y: auto; padding: 10px; }

.ticket-list::before {
  content: "CONVERSATIONS";
  display: block;
  padding: 12px 10px 14px;
  color: #929c95;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .2em;
}

.ticket-item {
  position: relative;
  margin-bottom: 5px;
  padding: 15px 14px 15px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ticket-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .65);
}

.ticket-item:hover,
.ticket-item.active {
  border-color: rgba(var(--accent-rgb), .12);
  background: rgba(var(--accent-rgb), .075);
  transform: translateX(2px);
}

.ticket-item b { color: #2d3b34; font-size: 10px; font-weight: 700; }
.ticket-item p { margin: 7px 0 0; font-size: 8px; }

.chat { display: flex; flex-direction: column; }

.chat::before {
  content: "SECURE SERVICE CHANNEL";
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--workspace-line);
  color: #8a958e;
  background: rgba(247, 248, 245, .7);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .18em;
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 25px;
  overflow: auto;
  background:
    radial-gradient(circle at 100% 100%, rgba(var(--accent-rgb), .08), transparent 30%),
    rgba(251, 251, 248, .54);
}

.bubble {
  max-width: min(75%, 620px);
  padding: 12px 14px;
  border: 1px solid rgba(12, 30, 22, .06);
  border-radius: 5px 14px 14px 14px;
  color: #344139;
  background: #f0f1ed;
  box-shadow: 0 5px 15px rgba(12, 30, 22, .035);
  font-size: 10px;
  line-height: 1.65;
}

.bubble b { display: block; margin-bottom: 5px; color: #657068; font-size: 8px; }
.bubble small { display: block; margin-top: 6px; color: #8c958f; font-size: 7px; }

.bubble.mine {
  align-self: flex-end;
  border-color: rgba(var(--accent-rgb), .15);
  border-radius: 14px 5px 14px 14px;
  color: #fff;
  background: linear-gradient(135deg, #17412f, #0c291e);
}

.bubble.mine b,
.bubble.mine small { color: rgba(255, 255, 255, .55); }

.chat-form {
  display: flex;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid var(--workspace-line);
  background: rgba(255, 255, 255, .78);
}

.chat-form input { flex: 1; min-width: 0; }
.chat-form button { flex: 0 0 auto; min-width: 72px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 12, 8, .7);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(540px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
  background: #f7f6f0;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .34);
}

.modal-card form { display: grid; gap: 16px; }
.modal-card p { color: var(--workspace-muted); font-size: 11px; line-height: 1.7; }

.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: #8d9690;
  font-size: 10px;
  letter-spacing: .04em;
}

.loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--accent-strong);
  font-size: 10px;
  letter-spacing: .09em;
}

.page-loading {
  min-height: 100vh;
  align-content: center;
  gap: 18px;
  background: #07120f;
  color: rgba(255, 255, 255, .55);
}

.page-loading p { margin: 0; }

.loading-mark {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(185, 147, 89, .55);
  border-radius: 50%;
  color: #c5a36b;
  font: italic 34px/1 Georgia, serif;
  animation: breathe 1.8s ease-in-out infinite;
}

.error { color: var(--danger); font-size: 10px; }
.hidden { display: none !important; }

@keyframes breathe {
  0%, 100% { opacity: .45; transform: scale(.96); box-shadow: 0 0 0 rgba(185, 147, 89, 0); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 30px rgba(185, 147, 89, .13); }
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 238px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
  .system-status { display: none; }
  .content { padding-inline: 28px; }
  .card,
  .card.wide { grid-column: span 6; }
  .card.full { grid-column: 1 / -1; }
  .products { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px;
  }
  .sidebar::before { display: none; }
  .side-brand { padding: 0; }
  .workspace-meta { position: absolute; top: 18px; right: 20px; margin: 0; }
  .nav {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 6px;
    margin-top: 20px;
  }
  .nav::before { display: none; }
  .nav button { grid-template-columns: auto minmax(0, 1fr); min-height: 43px; padding: 0 10px; }
  .nav button i { display: none; }
  .side-footer { display: none; }
  .content { padding: 26px 20px 56px; }
  .content::before { width: 60%; }
  .topbar { min-height: 92px; margin-bottom: 25px; padding-bottom: 22px; }
  .ticket-layout { grid-template-columns: 1fr; height: auto; }
  .ticket-list { max-height: 230px; }
  .chat { min-height: 520px; }
}

@media (max-width: 560px) {
  .sidebar { padding: 17px 14px 14px; }
  .side-mark { width: 39px; height: 39px; font-size: 23px; }
  .workspace-meta { top: 15px; right: 14px; padding: 9px 10px; }
  .workspace-meta div { display: none; }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .nav button { font-size: 10px; }
  .content { padding: 22px 14px 44px; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 32px; }
  .top-actions { gap: 7px; }
  .user-identity { padding: 4px; }
  .user-name { display: none; }
  .avatar { width: 34px; height: 34px; }
  .logout-button { width: 34px; height: 34px; }
  .card,
  .card.wide { grid-column: 1 / -1; padding: 20px; }
  .card.stat { min-height: 140px; }
  .stat .value { font-size: 32px; }
  .section-title { align-items: flex-start; }
  .section-title h3,
  .card > h3 { font-size: 20px; }
  .row { flex-direction: column; align-items: stretch; }
  .ticket-layout { min-height: 0; }
  .chat { min-height: 500px; }
  .messages { padding: 16px; }
  .bubble { max-width: 88%; }
  .chat-form { padding: 11px; }
  .table-wrap { margin-inline: -4px; }
  th,
  td { padding: 13px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.security-setup { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: radial-gradient(circle at 15% 10%, rgba(197,164,90,.16), transparent 38%), #06110d; color: #eef3ef; }
.security-card { width: min(560px, 100%); padding: 42px; border: 1px solid rgba(197,164,90,.32); background: rgba(9,25,19,.96); box-shadow: 0 28px 80px rgba(0,0,0,.42); }
.security-card .eyebrow { color: #d8bc77; letter-spacing: .16em; font-size: 12px; }
.security-card h1 { margin: 14px 0 10px; font-size: clamp(28px,5vw,44px); }
.security-card > p { color: #aab8b0; line-height: 1.8; }
.security-card form { display: grid; gap: 16px; margin: 26px 0 16px; }
.security-card label { display: grid; gap: 8px; color: #dbe5df; font-size: 13px; }
.security-card .field { background: #0f211a; border-color: #294238; color: #fff; }
.security-card .secondary { width: 100%; margin-bottom: 20px; }
.security-card > small { display: block; text-align: center; color: #708279; letter-spacing: .08em; }

.invite-panel { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.invite-panel .section-title { margin-bottom: 10px; }
.invite-panel .section-title p { margin: 6px 0 0; }
.invite-panel button.danger { padding: 8px 12px; font-size: 11px; }
.invite-secret { display: grid; gap: 14px; margin-top: 22px; }
.invite-secret code { display: block; overflow-wrap: anywhere; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #edf0e9; color: #173529; line-height: 1.7; user-select: all; }
