@font-face {
  font-family: Inter;
  src: url("/assets/inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #100f0e;
  --surface: #171513;
  --surface-raised: #201c16;
  --surface-control: #13120f;
  --border: #373024;
  --border-strong: #635137;
  --text: #f8f1e6;
  --muted: #c0b4a3;
  --muted-deep: #a99c8a;
  --accent: #efc56d;
  --accent-soft: #d9a44121;
  --amber: #f2a56c;
  --focus: #ffd770;
  --button-text: #211506;
  --button-fill: linear-gradient(130deg, #ffe0a1 4%, #e8b454 53%, #b77924 100%);
  --green: #89d6ad;
  --green-bg: #68bf8b19;
  --red: #f79c92;
  --red-bg: #e470661b;
  --shadow: 0 14px 40px #0005;
  --glow: 0 4px 16px #e6ad3c1a;
  --radius: 14px;
  --font: Inter, "Segoe UI", system-ui, sans-serif;
}

:root[data-theme="claro"] {
  color-scheme: light;
  --bg: #f7f1e6;
  --surface: #fffdf8;
  --surface-raised: #f4ecde;
  --surface-control: #fffdfa;
  --border: #d8cbb9;
  --border-strong: #b9a17e;
  --text: #211b15;
  --muted: #5f5141;
  --muted-deep: #6c5945;
  --accent: #805409;
  --accent-soft: #d9a4412a;
  --amber: #9b4c16;
  --focus: #926014;
  --green: #176c45;
  --green-bg: #cce7d8;
  --red: #9c342b;
  --red-bg: #f5ded9;
  --shadow: 0 14px 32px #4d361813;
  --glow: 0 4px 16px #b3822522;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font);
}

button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip-link { position: fixed; left: 1rem; top: 1rem; z-index: 20; padding: .65rem 1rem; background: var(--surface); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
body:has(dialog[open]) .skip-link { visibility: hidden; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 75px;
  padding: .65rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(110deg, var(--surface-raised), var(--surface) 46%);
}
.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand img { display: block; width: 158px; max-width: 100%; height: auto; }
.topbar-controls, .row, .header-actions { display: flex; align-items: center; gap: .75rem; }
.topbar-controls { flex-shrink: 0; }
.appearance { position: relative; display: flex; align-items: center; }
.appearance select { appearance: none; min-height: 38px; padding: .35rem 1.75rem .35rem 2.05rem; width: auto; font-size: .9rem; }
.appearance .icon { position: absolute; color: var(--muted); pointer-events: none; }
.appearance-icon { left: .65rem; }
.appearance-chevron { right: .5rem; width: .85rem; height: .85rem; }
.mobile-menu { display: none; }

.app-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: calc(100vh - 75px); }
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 1.35rem .9rem 1rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.navigation { display: grid; align-content: start; gap: .25rem; }
.navigation a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.navigation a:hover { color: var(--text); background: var(--surface-raised); }
.navigation a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-color: var(--border-strong); box-shadow: inset 2px 0 var(--accent), var(--glow); }
.sidebar-account { margin-top: auto; padding: 1.1rem .7rem 0; border-top: 1px solid var(--border); }
.sidebar-account span { display: block; font-size: .84rem; overflow-wrap: anywhere; color: var(--muted); margin-bottom: .3rem; }
.app-layout main {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 3rem);
  background: radial-gradient(ellipse at 100% 0, var(--accent-soft), transparent 60%) no-repeat top right / 60% 260px;
}
.content-wrap { margin-inline: auto; max-width: 1330px; min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.45rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.95rem, 4vw, 2.65rem); line-height: 1.12; font-weight: 675; letter-spacing: -.04em; }
h2 { font-size: 1.19rem; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
h3 { font-size: 1.03rem; font-weight: 650; }
p { color: var(--muted); }
.page-heading p { margin-top: .45rem; }
.numeric { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.caption { font-size: .875rem; color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.row { flex-wrap: wrap; }
.between { justify-content: space-between; }
.frequency { white-space: nowrap; color: var(--muted); font-size: .86rem; }
.up { color: var(--green); }
.down { color: var(--red); }

button, .button, input, select {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-control);
  min-height: 42px;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .52rem .85rem;
  text-decoration: none;
  line-height: 1.25;
  font-size: .91rem;
  font-weight: 600;
}
button:not(:disabled):hover, .button:hover { border-color: var(--accent); }
button.primary, a.primary { color: var(--button-text); background: var(--button-fill); border-color: #ac823e; box-shadow: var(--glow); }
button.primary:not(:disabled):hover, a.primary:hover { filter: brightness(1.1); }
button.quiet-button { border-color: transparent; color: var(--muted); background: transparent; padding-inline: .35rem; }
button.quiet-button:not(:disabled):hover { color: var(--text); border-color: transparent; }
button.icon-button { width: 40px; min-height: 40px; padding: .2rem; }
input, select { width: 100%; padding: .5rem .65rem; min-width: 0; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.025rem; height: 1.025rem; flex: none; margin: 0; accent-color: var(--accent); }
label { font-weight: 600; font-size: .9rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field small { font-size: .82rem; color: var(--muted); font-weight: 400; }
.choice { display: flex; align-items: center; gap: .55rem; min-height: 32px; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
fieldset { min-width: 0; margin: 0; padding: .65rem 0 0; border: 0; border-top: 1px solid var(--border); }
legend { padding: 0 .5rem 0 0; font-weight: 650; font-size: .925rem; }

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.panel-heading p { margin-top: .25rem; }
.empty { display: grid; justify-items: start; gap: .6rem; min-height: 180px; align-content: center; padding: 1.1rem .2rem; }
.empty .icon { font-size: 1.6rem; color: var(--accent); }
.empty p { max-width: 54ch; }
.status {
  display: inline-flex;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin: 0;
  padding: .18rem .58rem;
  font-size: .82rem;
  font-weight: 650;
}
.status.pending, .status.partial, .status.warning { color: var(--accent); background: var(--accent-soft); }
.status.accepted, .status.filled, .status.closed { color: var(--green); background: var(--green-bg); }
.status.rejected { color: var(--red); background: var(--red-bg); }
.data-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: .7rem .55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { font-size: .84rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.data-table td { font-size: .9rem; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong, .data-table td small { display: block; }
.data-table td:last-child { text-align: right; }
.data-table td small { color: var(--muted); }
.data-table .button { min-height: 34px; font-size: .84rem; white-space: nowrap; }
.profile-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px,100%),1fr)); }
.profile-list .panel { display: grid; align-content: start; gap: .8rem; }
.profile-list .panel-heading { margin: 0; }
.exchange-connectors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
:is(.profile-list, .exchange-connectors, .account-profile-grid, .stack:has(> .simulation-account)) {
  gap: 0;
  border-radius: var(--radius);
  background: var(--surface);
}
.stack:has(> .simulation-account) section[aria-labelledby="hooks-title"] > div:first-child { padding: .75rem 1.2rem 0; }
@media (max-width: 700px) { .exchange-connectors { grid-template-columns: minmax(0, 1fr); } }
:is(.exchange-connection, .simulation-account) { display: grid; align-content: start; gap: .7rem; }
:is(.exchange-connection, .simulation-account) .panel-heading { margin: 0; }
.simulation-account .values + .caption { margin-top: 0; }
.exchange-connection fieldset { display: grid; gap: .8rem; }
.exchange-connection input:disabled { opacity: .65; }
.group-alerts { display: grid; gap: .65rem; }
.group-alerts .panel-heading { margin: 0; }
.group-alerts-form fieldset { padding: 0; }
.group-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: .28rem 1rem;
  padding-block: .55rem;
  border-bottom: 1px solid var(--border);
}
.group-alert-hint { margin: 0 0 0 1.575rem; }
@media (max-width: 540px) {
  .group-alert-row { grid-template-columns: minmax(0, 1fr); }
  .group-alert-row .field { margin-inline-start: 1.575rem; }
}
.exchange-identity { display: flex; align-items: center; gap: .65rem; }
.exchange-logo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--exchange-logo) center / 30px 30px no-repeat;
}
.exchange-logo:hover { box-shadow: 0 0 0 1px var(--border-strong); }
/* Bitunix site icon and BloFin's official Play Store app icon, sized for the connector cards. */
[data-exchange="bitunix"] { --exchange-logo: url("data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAQAAAAPwAAPwAAQUxQSI0AAAABcFtbe9p8R9ognMkMi0Cr3UxDhLkytNKvr/ff50TEBAAGm7IeuPi5LY+wAAyyE5Xec1hYODKIBgmkg0VKL1QqngkOvyhUK/G5qhioOLDoo2iS2M5UPvDv/0Hb3EbRJLEvGDQFVqtnFD0Sfwck9KJFPFNYODKIBgmkg4VFfqfSUwYDwOJYtvPyhrrawAAAVlA4IEgCAAAQDgCdASpAAEAAPj0ci0OiIaEVCzUYIAPEsQBpkNdef/Vd5n8TfUBtgP1V82D1x+eA6zP0AP1A60f9kv2Z9ol4z/ujvUNOO9Kb/A8un0B/yPS46+363GbxJdHbCUe+4ZSz2d8AnJkDosH2PU35IzWHlJ76iznURcAAAP7+pTYHXdncv6PdFRcAvXq3b4sef98ziSx/2bj/+fj/GvXXl+vX5bgX9IDZv2MlomALSYrMuaLz3X1OT5XWk8FumzIrVJwPgi1GjtdG5w7yUnXzzFYj/tYf+LQ4/ioDpj/45Qh7uZ+rl29PtAJZ3qnNvEzFZ3SsCNvRz6bpP0hidONqJajjMS0bWKzjE78cw4Og5C2diUKt7tnxzAcykjBMUPczDDGt5/oQesm7/QX8u2B9JMSOSTQGq9a2a+27aV1AHM4y1IBq5+yD8a0/PQoBatXhrWhLWVytNeKn/Ny37+Qa6H93Ptzm0UXLL8S8IKOEvX98H7nkftBGbEqPOvL79ojgYPdTJiDlSgvTlWEIVd9YVFE+pc8uE7Kegeo93msud6rx7I4NPL/up7Rt2nx+yiLhCJVz/+Jb/Km3lE3qwrHiuvJhKGlZOu6F9JNJf9nPitme8VQYGqmS1+oK/S62DLtMfjou01pCW1vANN9L+Nv+veYxFkKFA7Pr8pHJfAsb973/y/UEuFMm6/bV8onhLElmFI2/b6hbqK7ox/EkdVWwQ3onfk3/YeP/Z565MYD6/+/4nTv4wUk/rJwQKUbh8VogazKk5t1vAAAAAA=="); }
[data-exchange="blofin"] { --exchange-logo: url("data:image/webp;base64,UklGRo4CAABXRUJQVlA4IIICAADQEgCdASpAAEAAPj0ci0SiIYkGApIQAeJQA7gvgHCGaBdzcM1+k7QBuAPtA4QD+if0brAPQA/UnrGv1z/cP2Scwg7Lf65yeSQD6X/eNAA/iH9exmymjvRM/wP5j5r/nX2Av49/OP936oHUiftupyJMt1EIGtDsqc4lfc8j0Y5vc2L/atwg3ffdHbvat7AtwnVlAVPIUh2c6Cwlh8/OCoAA/v/k4SLu2/F9jRfy5FQF5G5/JexQGV7d8ke2gHM1atziV1azRdX/aTLdXXxfR1yZcGjhTiEYephf4Ln/9KD+/j8Wn//XQfgoYIYqlLDMnZt4HDbwaOXZ3w/2v2v+xqllt/ZyDfI9lyUSucmfH9kKuW5o/YclwtREvy7pXzbrgJhkXC7nnZ/t0BKB6wCsfmkfilqKlER/EV8GIMjTX9l90WL1AzW2xSpBMfxxfprLYgNjEif7vWVnfqu/8c/Fz8EZHyhtrfm+KXUhTC4j8DxXlz+Gh2Y/qGT/euVsYu+FV5gEhlXpzGn39mEtLCBMubrGd9tFcN/2DnwaRAHhqnAdw09bbqj/oQFVSNCB1McpNYelGTF+fzSwvGsX/Ab9O8JOR5XFQVccrm+1NuTilOlZq680SU9WVKThFHnNrbRX9n+R88sRMvw8xnzQnYXIB06gtmP/6lLgP6E5EbvbZTUGf+X7/lybPvn+ONhQ0Mdh73EcqqjNnfj8QPOWN1hvGZhh6W3ZjDYngvbT2QHXfm1ykSb2VfM0tMOZwbzXf99GwNiyFrlRWzvcphN9+oP21GHTOmP8uz5dLy4aqjvrlnCC02b3P3sJW5vhM9MGfIwWw9qy+Ab6L23/YAwG44VJptjQAAA="); }
#hooks-title { margin-bottom: .85rem; }
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(115px,100%),1fr));
  gap: .65rem .8rem;
  margin: 0;
}
.values div { border-top: 1px solid var(--border); padding-top: .55rem; min-width: 0; }
.values dt { color: var(--muted); font-size: .84rem; }
.values dd { font-size: .94rem; font-weight: 650; margin: .12rem 0 0; overflow-wrap: anywhere; }
.values + .caption { margin-top: .65rem; }
.banner { padding: .7rem .8rem; border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: .9rem; color: var(--text); border-radius: 5px; }

.auth-content { width: min(100% - 2rem, 965px); margin: clamp(2rem, 8vh, 5.5rem) auto 2rem; }
.auth-form { display: grid; align-content: center; gap: 1rem; padding: clamp(1.5rem, 4vw, 2.75rem); background: var(--surface); }
.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  padding: .25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-raised);
}
.auth-mode-switch > button { min-width: 0; min-height: 38px; padding-inline: .35rem; color: var(--muted); background: transparent; border-color: transparent; }
.auth-mode-switch > button[aria-pressed="true"] { color: var(--text); background: var(--accent-soft); border-color: var(--border-strong); }
.auth-form form { display: grid; gap: .85rem; }
.auth-google-option { display: grid; gap: .4rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.auth-google-option .auth-google {
  gap: 10px;
  padding-inline: 12px;
  border-color: #747775;
  color: #1f1f1f;
  background: #fff;
  font: 500 14px/20px "Google Sans", system-ui, sans-serif;
}
.auth-google-option .auth-google:hover { border-color: #747775; background: #f2f2f2; }
.auth-google-option .auth-google:disabled { opacity: .55; background: #fff; }
.auth-google img { display: block; flex: none; }
.auth-form .error-text, .dialog-body .error-text { padding: .65rem; border-radius: 6px; }

.account-menu-name { display: block; overflow-wrap: anywhere; }
.account-menu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .65rem; }
.account-menu-actions .account-menu-profile { display: inline-flex; align-items: center; gap: .35rem; padding-block: .45rem; font-size: .91rem; font-weight: 650; text-decoration: none; }
.account-menu-actions .account-menu-profile:hover { text-decoration: underline; }
.topbar-account summary img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.account-profile-grid { display: grid; grid-template-columns: minmax(168px, 220px) minmax(0, 590px); max-width: 810px; }
.account-profile-nav { display: grid; align-content: start; gap: .25rem; }
.account-profile-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: .55rem;
  padding: .45rem .65rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 625;
  text-decoration: none;
}
.account-profile-nav a:hover { color: var(--text); background: var(--surface-raised); }
.account-profile-nav a[aria-current="page"] { color: var(--accent); border-color: var(--border-strong); background: var(--accent-soft); }
.account-profile-panel, .account-profile-form, .account-security-form, .account-current-factor, .account-email-code { display: grid; gap: .9rem; }
.account-profile-panel .values { margin: .25rem 0 0; }
.account-profile-form textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid var(--border-strong); border-radius: 8px; padding: .5rem .65rem; color: var(--text); background: var(--surface-control); font: inherit; }
.account-photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; }
.account-photo { display: grid; flex: none; width: 70px; height: 70px; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.account-photo svg { width: 1.65rem; height: 1.65rem; }
.account-photo img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.account-photo-options { flex: 1 1 150px; min-width: 0; }
.account-avatar-picker { position: relative; justify-items: start; cursor: pointer; }
.account-avatar-input { position: absolute; width: 1px; min-height: 0; height: 1px; clip-path: inset(50%); overflow: hidden; padding: 0; }
.account-avatar-picker:focus-within .button { outline: 2px solid var(--focus); outline-offset: 3px; }
.account-photo-options .caption:empty, .account-email-code .caption:empty { display: none; }
.account-setting { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.account-setting > div { flex: 1 1 200px; }
.account-appearance { max-width: 240px; }
.account-challenge { max-width: 445px; margin: 0 auto; }
.account-challenge h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.account-email-code { justify-items: start; gap: .35rem; }
.account-totp-setup { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.account-totp-setup > div { flex: 1 1 155px; min-width: 0; }
.account-totp-setup code { display: block; overflow-wrap: anywhere; }
.account-qr { max-width: 100%; height: auto; border: 6px solid #fff; border-radius: 5px; background: #fff; }
.account-recovery-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: .4rem; list-style: none; margin: 0; padding: 0; }
.account-recovery-codes li { padding: .35rem .5rem; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 6px; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .account-profile-grid { grid-template-columns: minmax(0, 1fr); }
  .account-profile-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-profile-nav a { justify-content: center; text-align: center; padding-inline: .25rem; }
}
@media (max-width: 420px) {
  .account-profile-nav a { font-size: .8rem; }
  .account-profile-nav a .icon { display: none; }
  .account-profile-panel .values { grid-template-columns: minmax(0, 1fr); }
}

.loading { padding: 3rem 1rem; text-align: center; }
.loading button { margin-top: .85rem; }
.notice { position: fixed; z-index: 10; right: 1.25rem; bottom: 1.25rem; max-width: min(410px, calc(100% - 2.5rem)); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .78rem 1rem; box-shadow: var(--shadow); background: var(--surface-raised); color: var(--text); overflow-wrap: anywhere; }
.notice[data-kind="error"], .error-text { color: var(--red); background: var(--red-bg); }

dialog {
  width: min(560px, calc(100% - 1.75rem));
  max-height: calc(100% - 1.75rem);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: #080604bc; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; gap: .65rem; border-bottom: 1px solid var(--border); }
.dialog-body { display: grid; gap: .85rem; padding: 1.1rem; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem; }

dialog:has(.close-ticket) {
  width: min(440px, calc(100% - 1.5rem));
  border-color: #c79140;
  border-radius: 21px;
  background: var(--shell-panel, var(--surface));
  box-shadow: 0 0 0 1px #edb95a22, 0 10px 34px #0008, 0 0 24px #db93262e;
}
dialog:has(.close-ticket)::backdrop { background: #0806049c; backdrop-filter: blur(3px); }
dialog:has(.close-ticket) .dialog-heading { border-bottom: 0; padding-bottom: .25rem; }
dialog:has(.close-ticket) .dialog-heading button { border: 0; background: transparent; }
.close-ticket { gap: 1rem; }
.close-market { display: flex; align-items: center; flex-wrap: wrap; gap: .38rem; }
.close-market span, .close-market strong {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .57rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: .79rem;
}
.close-modes { padding: .3rem 0 0; border: 0; }
.close-modes > div, .close-ticket .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.close-modes label {
  padding: .5rem .65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  min-height: 42px;
  line-height: 1.15;
  cursor: pointer;
}
.close-modes label:has(:checked) {
  border-color: #daa44a;
  background: var(--accent-soft);
  box-shadow: inset 0 0 10px #d29c3e2e, 0 0 9px #ffc35e36;
}
.close-modes label:has(:disabled) { color: var(--muted); opacity: .65; cursor: default; }
.close-field { position: relative; }
.close-field input { padding-inline-end: 3.45rem; }
.close-field > span { position: absolute; inset-inline-end: .7rem; top: .63rem; pointer-events: none; color: var(--muted); }
.close-confirmation {
  display: flex;
  gap: .65rem;
  padding: .76rem;
  border: 1px solid #c8943d;
  border-radius: 10px;
  background: var(--accent-soft);
}
.close-confirmation > .icon, .close-confirmation strong { color: var(--accent); }
.close-confirmation p { margin-top: .24rem; color: var(--text); font-size: .84rem; }
.close-ticket .dialog-actions { grid-template-columns: .85fr 1.15fr; }

@media (max-width: 700px) {
  dialog:has(.close-ticket) { margin: auto auto .65rem; max-height: calc(100% - 1.3rem); }
  .close-ticket { gap: .8rem; }
  .close-modes label { padding-inline: .48rem; font-size: .81rem; }
}

@media (max-width: 1000px) {
  .app-layout { grid-template-columns: 186px minmax(0, 1fr); }
  .app-layout main { padding: 1.5rem; }
}

@media (max-width: 700px) {
  .topbar { padding: .7rem .8rem; min-height: 65px; gap: .5rem; }
  .brand img { width: 126px; }
  .topbar-controls { gap: .35rem; }
  .appearance select { min-height: 36px; padding: .3rem 1.15rem .3rem .4rem; font-size: .8rem; }
  .appearance-icon { display: none; }
  .appearance-chevron { right: .3rem; width: .69rem; height: .69rem; }
  .mobile-menu { display: inline-flex; }
  button.mobile-menu { min-height: 36px; width: 36px; }
  .app-layout { display: block; }
  .sidebar { display: none; border: 0; border-bottom: 1px solid var(--border); padding: .5rem .8rem; }
  .sidebar.open { display: flex; }
  .sidebar-account { margin-top: .5rem; }
  .app-layout main { padding: 1.25rem .85rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .panel { padding: .85rem; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 440px) {
  .fields-grid { grid-template-columns: 1fr; }
  .status { font-size: .76rem; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { border: 1px solid var(--border); border-radius: 8px; padding: .4rem .65rem; margin-bottom: .65rem; }
  .data-table td, .data-table tr:last-child td { display: flex; justify-content: space-between; gap: .65rem; align-items: center; border: 0; padding: .35rem 0; }
  .data-table td:first-child { text-align: left; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }
  .data-table td:first-child::before, .data-table td:last-child::before { display: none; }
  .data-table td::before { content: attr(data-label); color: var(--muted); flex: none; font-size: .8rem; }
  .data-table td:last-child { justify-content: flex-end; }
}
