/* Interactive Exemeta workspace — structure of the product, not a screenshot. */

.xapp {
  scroll-margin-top: calc(var(--nav-h, 4.25rem) + 0.6rem);
  --x-bg: #1c2433;
  --x-side: #151b27;
  --x-card: #262e3c;
  --x-card-2: #2c3546;
  --x-line: rgb(255 255 255 / 8%);
  --x-text: #e8eef7;
  --x-muted: #93a0b5;
  --x-green: #2fce8b;
  --x-green-2: #163f34;
  --x-red: #e25b5b;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(42rem, 82vh);
  min-height: 34rem;
  border-radius: 1.15rem;
  overflow: hidden;
  color: var(--x-text);
  background: var(--x-bg);
  border: 1px solid color-mix(in oklch, white 18%, #1c2433);
  box-shadow:
    0 30px 70px -36px color-mix(in oklch, #071018 80%, transparent),
    0 0 0 1px color-mix(in oklch, var(--accent) 25%, transparent);
}

.xapp [hidden] {
  display: none !important;
}

.xapp button,
.xapp input,
.xapp select {
  font: inherit;
  color: inherit;
}

.xapp button {
  cursor: pointer;
}

.xapp__chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  background: #121821;
  border-bottom: 1px solid var(--x-line);
}

.xapp__chrome i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #5c6778;
}

.xapp__chrome i:nth-child(1) { background: #e36b5a; }
.xapp__chrome i:nth-child(2) { background: #e2b34a; }
.xapp__chrome i:nth-child(3) { background: #3dbe78; }

.xapp__chrome span {
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--x-muted);
}

.xapp__body {
  min-height: 0;
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
}

.xrail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.35rem;
  background: var(--x-side);
  border-right: 1px solid var(--x-line);
}

.xrail button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: auto;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: #9aabbe;
}

.xrail button[aria-pressed="true"] {
  background: #2d6cdf;
  color: white;
}

.xrail svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.xview {
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.xview[hidden] {
  display: none;
}

.xbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(90deg, #2fce8b, #59e0a4);
  color: #073224;
}

.xbar strong {
  display: block;
  font-size: 0.95rem;
}

.xbar span,
.xmuted {
  color: var(--x-muted);
  font-size: 0.78rem;
}

.xbar span {
  color: #0c4632;
}

.xpad {
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.xstats,
.xcharts {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 860px) {
  .xstats,
  .xcharts {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.xcard {
  background: var(--x-card);
  border: 1px solid var(--x-line);
  border-radius: 0.8rem;
  padding: 0.8rem 0.9rem;
}

.xcard h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
}

.xline {
  width: 100%;
  height: 7.5rem;
  display: block;
}

.xbars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 0.45rem;
  height: 7.5rem;
}

.xbars span {
  display: block;
  border-radius: 0.25rem 0.25rem 0 0;
  background: var(--x-green);
  min-height: 8%;
}

.xbars span:nth-child(odd) { background: #4aa3e8; }
.xbars span:nth-child(3) { background: var(--x-green); }

.xtiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
  gap: 0.55rem;
}

.xtiles button {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  padding: 0.75rem 0.4rem;
  border: 1px solid var(--x-line);
  border-radius: 0.75rem;
  background: var(--x-card);
  text-align: center;
}

.xtiles button:hover,
.xtiles button:focus-visible {
  border-color: color-mix(in oklch, var(--x-green) 55%, transparent);
}

.xtiles small {
  color: var(--x-muted);
  font-size: 0.68rem;
}

.xinbox {
  height: 100%;
  min-height: 28rem;
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
}

.xstage,
.xstage__pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.xstage__pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
}

.xstage__pane[hidden] {
  display: none;
}

.xlist,
.xchat,
.xprofile {
  min-height: 0;
  min-width: 0;
}

.xlist {
  border-right: 1px solid var(--x-line);
  background: #1a2230;
  overflow: auto;
}

.xfilter,
.xsearch {
  width: calc(100% - 1rem);
  margin: 0.55rem 0.5rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in oklch, #7d5cff 55%, transparent);
  background: #121821;
}

.xsearch {
  margin-bottom: 0.35rem;
}

.xthread {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--x-line);
  background: transparent;
  text-align: start;
}

.xthread[aria-pressed="true"] {
  background: #1aa35a;
}

.xthread[aria-pressed="true"] em,
.xthread[aria-pressed="true"] strong {
  color: white;
}

.xav {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #31445a;
  font-size: 0.72rem;
  font-weight: 700;
}

.xthread strong,
.xchat__head strong {
  display: block;
  font-size: 0.84rem;
}

.xthread em {
  display: block;
  color: var(--x-muted);
  font-style: normal;
  font-size: 0.72rem;
}

.xchat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #232b3a;
}

.xchat__head {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--x-line);
  background: #143e3a;
}

.xcomposer {
  display: flex;
  gap: 0.3rem;
  overflow: auto;
  padding: 0.45rem 0.65rem 0;
}

.xcomposer button {
  border: 0;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: #2a3344;
  color: var(--x-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.xprofile {
  border-bottom: 0;
  border-left: 1px solid var(--x-line);
  overflow: auto;
  background: #1b2330;
}

.xstage .xprofile {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 0.75rem 0.7rem 1rem;
}

.xstage .xprofile > strong {
  font-size: 0.86rem;
}

.xstage .xprofile section {
  display: grid;
  gap: 0.28rem;
}

.xstage .xprofile h4,
.xstage .xprofile p {
  margin: 0;
}

.xstage .xprofile h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 650;
}

.xwho {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
}

.xwho .xav {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.62rem;
}

.xprofile__acts {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.xprofile__acts button {
  border: 0;
  border-radius: 0.4rem;
  background: #343c4d;
  padding: 0.38rem 0.45rem;
  font-size: 0.66rem;
}

.xstage .xprofile label {
  display: grid;
  gap: 0.28rem;
  color: var(--x-muted);
  font-size: 0.75rem;
}

.xstage .xprofile select {
  width: 100%;
  padding: 0.4rem 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid rgb(255 255 255 / 14%);
  background: #121821;
}

.xprofile dl {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
}

.xprofile dt {
  color: var(--x-muted);
  font-size: 0.68rem;
}

.xprofile dd {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
}

.xmsgs {
  overflow: auto;
  padding: 0.85rem;
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.xmsg {
  max-width: 78%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  background: #2d3648;
  font-size: 0.82rem;
  line-height: 1.45;
}

.xmsg--out {
  justify-self: end;
  background: #1d6b52;
}

.xmsg small {
  display: block;
  margin-top: 0.25rem;
  color: rgb(255 255 255 / 62%);
  font-size: 0.66rem;
}

.xactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem;
  border-top: 1px solid var(--x-line);
}

.xactions button,
.xprimary,
.xdanger {
  border-radius: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--x-line);
  background: #2a3344;
}

.xdanger {
  background: #a33b3b;
  border-color: transparent;
}

.xprimary {
  background: var(--x-green);
  color: #06281c;
  border-color: transparent;
  font-weight: 700;
}

.xback {
  display: none;
  margin-bottom: 0.25rem;
  border: 0;
  background: none;
  color: var(--x-green);
  padding: 0;
}

.xtabs {
  display: flex;
  gap: 0.15rem;
  overflow: auto;
  padding: 0.35rem 0.55rem;
  background: #121821;
}

.xtabs button {
  border: 0;
  background: transparent;
  color: var(--x-muted);
  padding: 0.45rem 0.6rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-size: 0.75rem;
}

.xtabs button[aria-pressed="true"] {
  color: var(--x-green);
  border-bottom-color: var(--x-green);
}

.xchannels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.65rem;
}

.xch {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  border-radius: 0.8rem;
  background: var(--x-card);
  border: 1px solid var(--x-line);
}

.xch header {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: start;
}

.xch__ops {
  display: flex;
  gap: 0.35rem;
}

.xch__ops button {
  flex: 1;
  border: 0;
  border-radius: 0.35rem;
  padding: 0.28rem 0.35rem;
  font-size: 0.68rem;
}

.xch__ops button:first-child {
  background: var(--x-green);
  color: #06281c;
}

.xch__ops button:last-child {
  background: var(--x-red);
  color: white;
}

.xaxes {
  display: flex;
  justify-content: space-between;
  gap: 0.15rem;
  margin-top: 0.4rem;
  color: var(--x-muted);
  font-size: 0.6rem;
}

.xaxes span {
  flex: 1;
  text-align: center;
}

.xnew {
  justify-self: start;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  background: var(--x-green);
  color: #06281c;
  font-size: 0.75rem;
  font-weight: 700;
}

.xtoggle {
  border-radius: 999px;
  border: 0;
  padding: 0.2rem 0.5rem;
  background: #3a4558;
  font-size: 0.68rem;
}

.xtoggle[aria-pressed="true"] {
  background: var(--x-green);
  color: #06281c;
}

.xphone-wrap {
  min-height: 100%;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.7rem 1.2rem;
  background: #121821;
}

.xphone-switch {
  display: flex;
  gap: 0.3rem;
  padding: 0.22rem;
  border-radius: 999px;
  background: #1c2433;
  border: 1px solid var(--x-line);
}

.xphone-switch button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.75rem;
  color: var(--x-muted);
}

.xphone-switch button[aria-pressed="true"] {
  background: #2a3548;
  color: white;
}

.xpbx {
  width: min(18.5rem, 100%);
  display: grid;
  gap: 0.62rem;
  padding: 0.8rem 0.72rem 0.75rem;
  border-radius: 1.15rem;
  background: #171f2e;
  border: 1px solid rgb(255 255 255 / 8%);
}

.xpbx__ready {
  margin: 0;
  text-align: center;
  padding: 0.55rem 0.6rem;
  border-radius: 0.7rem;
  background: #243044;
  font-size: 0.88rem;
  font-weight: 650;
}

.xpbx__ready span {
  color: var(--x-muted);
  font-weight: 500;
}

.xpbx select,
.xpbx input {
  width: 100%;
  min-height: 2.35rem;
  border-radius: 0.55rem;
  border: 1px solid rgb(255 255 255 / 10%);
  background: #121821;
  padding: 0.35rem 0.65rem;
}

.xpbx__dial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.4rem;
  align-items: center;
}

.xpbx__dial button,
.xpbx__tools button {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  border: 1px solid rgb(255 255 255 / 10%);
  background: #243044;
  display: grid;
  place-items: center;
  padding: 0;
  color: #d5deea;
}

.xpbx svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  stroke: none;
}

.xpbx__acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.xpbx__acts button {
  height: 2.7rem;
  border: 0;
  border-radius: 0.75rem;
  color: #071018;
}

.xpbx__acts svg {
  width: 1.35rem;
  height: 1.35rem;
}

.xpbx__drop { color: white; }

.xpbx__call {
  background: #2fce8b;
  box-shadow: 0 0 16px rgb(47 206 139 / 55%);
}

.xpbx__hold { background: #e2b34a; }

.xpbx__drop {
  background: #e25b5b;
  color: white;
}

.xpbx__tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  gap: 0.45rem 0.35rem;
}

.xpbx button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px var(--x-green);
}

.xpbx .xnote {
  margin: 0;
  min-height: 1.1rem;
  text-align: center;
}

.xphone {
  width: min(18rem, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid color-mix(in oklch, var(--x-green) 45%, transparent);
  border-radius: 1rem;
  background: #172033;
}

.xphone select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  min-height: 2.1rem;
  border-radius: 0.45rem;
  border: 1px solid var(--x-line);
  background: #121821;
  color: white;
  padding: 0.3rem 0.5rem;
}

.xphone output {
  min-height: 1.6rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.xkeys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.xkeys button {
  border: 1px solid var(--x-line);
  background: #243044;
  border-radius: 0.65rem;
  min-height: 2.7rem;
}

.xkeys--pbx button {
  min-height: 2.45rem;
  border-radius: 0.7rem;
  background: #1c2738;
  font-size: 1rem;
}

.xkeys small {
  display: block;
  color: var(--x-muted);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.xsteps {
  display: flex;
  gap: 0.35rem;
  overflow: auto;
  padding-bottom: 0.2rem;
}

.xsteps span {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #313a4c;
  font-size: 0.72rem;
  flex: none;
}

.xsteps span.is-on {
  background: var(--x-green);
  color: #06281c;
}

.xmodes,
.xsectors {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 800px) {
  .xmodes { grid-template-columns: 1fr 1fr; }
  .xsectors { grid-template-columns: repeat(3, 1fr); }
}

.xmodes button,
.xsectors button,
.xfile {
  text-align: start;
  border: 1px solid var(--x-line);
  background: var(--x-card);
  border-radius: 0.75rem;
  padding: 0.7rem;
}

.xmodes button[aria-pressed="true"],
.xsectors button[aria-pressed="true"],
.xfile[aria-pressed="true"] {
  border-color: var(--x-green);
  box-shadow: inset 0 0 0 1px var(--x-green);
}

.xmodes ul {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
  color: var(--x-muted);
  font-size: 0.75rem;
}

.xfiles {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  min-height: 100%;
}

.xfolders {
  border-right: 1px solid var(--x-line);
  padding: 0.6rem;
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.xfolders button {
  text-align: start;
  border: 0;
  background: transparent;
  padding: 0.4rem 0.45rem;
  border-radius: 0.45rem;
  color: var(--x-muted);
}

.xfolders button[aria-pressed="true"] {
  background: var(--x-green);
  color: #06281c;
}

.xgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr));
  gap: 0.55rem;
  padding: 0.7rem;
  align-content: start;
}

.xfile {
  display: grid;
  gap: 0.35rem;
  min-height: 5.5rem;
}

.xfile b {
  height: 3.2rem;
  border-radius: 0.45rem;
  background:
    linear-gradient(145deg, color-mix(in oklch, var(--x-green) 55%, #1c2433), #31445c);
}

.xfile:nth-child(3n) b { background: linear-gradient(145deg, #3d6f9a, #1c2433); }
.xfile:nth-child(4n) b { background: linear-gradient(145deg, #c4843a, #1c2433); }

.xfile span {
  font-size: 0.68rem;
  color: var(--x-muted);
}

.xlogin {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 20% 20%, rgb(47 206 139 / 16%), transparent 28%),
    radial-gradient(circle at 80% 70%, rgb(80 160 220 / 16%), transparent 32%),
    linear-gradient(#1a2230, #121820);
}

.xlogin form {
  width: min(18rem, 100%);
  display: grid;
  gap: 0.55rem;
  padding: 1.1rem;
  border-radius: 1rem;
  background: #242c3b;
  border: 1px solid var(--x-line);
}

.xlogin h2 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  text-align: center;
  letter-spacing: 0;
}

.xlogin label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--x-muted);
}

.xlogin input,
.xlogin select {
  width: 100%;
  min-height: 2.2rem;
  border-radius: 0.45rem;
  border: 0;
  background: #f4f7fb;
  color: #172033;
  padding: 0.35rem 0.55rem;
}

.xnote {
  min-height: 1rem;
  font-size: 0.75rem;
  color: var(--x-green);
}

.xstatus {
  padding: 0 0.85rem 0.35rem;
  color: var(--x-green);
  font-size: 0.75rem;
}

@media (max-width: 820px) {
  .xstage__pane {
    grid-template-columns: minmax(0, 1fr);
  }

  .xprofile {
    display: none;
  }

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

  .xfolders {
    grid-auto-flow: column;
    border-right: 0;
    border-bottom: 1px solid var(--x-line);
    overflow: auto;
  }
}

@media (max-width: 640px) {
  .xapp {
    height: auto;
    min-height: 36rem;
  }

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

  .xinbox.is-open .xlist {
    display: none;
  }

  .xinbox:not(.is-open) .xstage {
    display: none;
  }

  .xback {
    display: inline-flex;
  }

  .xprofile {
    display: none;
  }
}
