/* Shared workspace sections: console, files, editor, chat and access. Tokens and components come from panel-design.css. */
#shared-status:empty {
  display: none;
}
.shared-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.sw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sw-tabs .wf-button[aria-selected="true"] {
  border-color: transparent;
  background: var(--item-on);
  box-shadow: var(--item-on-sh);
  color: var(--nav-on-tx);
}
[role="tabpanel"][hidden] {
  display: none;
}

/* Section headings: title and status on the left, section actions on the right. */
.sw-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.sw-section-heading > div {
  flex: 1;
  min-width: min(100%, 14rem);
}
.sw-section-heading > div > * + * {
  margin-top: 4px;
}
.sw-section-heading p {
  color: var(--tx2);
  font-size: 13.5px;
}

/* Console: a dark terminal card in both modes. */
.sw-console-card {
  padding: 20px;
  border-radius: 24px;
}
.sw-console-card .sw-section-heading {
  padding: 2px 4px 0;
}
.sw-console-card #sw-output {
  min-height: 420px;
  max-height: 62vh;
}
.sw-console-card form {
  max-width: none;
}
.sw-console-card form .aa-help {
  margin: 8px 4px 0;
}
#sw-command-text,
#chat-message {
  font-family: var(--font-mono);
}

/* Files */
.sw-files-table td:first-child {
  min-width: 180px;
  max-width: 360px;
}
.sw-files-table td:nth-child(2) {
  color: var(--tx2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sw-files-table td:last-child {
  white-space: nowrap;
}
.sw-files-table td:last-child .wf-button + .wf-button {
  margin-left: 6px;
}
.sw-files-table td:first-child .wf-button {
  min-height: 0;
  padding: 4px 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--tx);
  font-size: 14px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sw-files-table td:first-child .wf-button:hover {
  color: var(--link);
  background: transparent;
}
#sw-location {
  max-width: none;
  margin-top: 14px;
}
#sw-up {
  flex: none;
}
#sw-editor {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
#sw-editor > * + * {
  margin-top: 12px;
}
#sw-editor-text {
  width: 100%;
}
#sw-editor-meta {
  color: var(--tx2);
  font-size: 12.5px;
}
#sw-more {
  margin-top: 12px;
}

/* Chat: the same dark terminal card as the console. */
.panel-chat {
  padding: 20px;
  border-radius: 24px;
}
.panel-chat .sw-section-heading {
  padding: 2px 4px 0;
}
.panel-chat #chat-output {
  min-height: 360px;
  max-height: 58vh;
}
.panel-chat form {
  max-width: none;
}
.panel-chat form .aa-help {
  margin: 8px 4px 0;
}

/* Users & FTP access */
#shared-access .aa-access-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
#shared-access .aa-access-forms form {
  max-width: none;
  padding: 18px;
  border: 1px solid var(--tile-bd);
  border-radius: 20px;
  background: var(--tile);
  box-shadow: var(--tile-sh);
}
#shared-access fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
}
#shared-access .sw-inline {
  max-width: 36rem;
}
#access-held-detail {
  overflow-wrap: anywhere;
}
#access-search-results,
.aa-search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.aa-retry {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--amb);
  box-shadow: var(--amb-sh);
  color: var(--amb-tx);
}
.aa-retry[hidden] {
  display: none;
}
@media (max-width: 700px) {
  #shared-access .aa-access-forms {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Logs (item 5.4): one line per cell; the table scrolls inside its card, never the page. */
.lg-table td {
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Health (item 5.7): tables as on Logs; the release ID wraps rather than widening the page. */
.hl-table td {
  white-space: nowrap;
  overflow-wrap: normal;
}
.hl-release code {
  overflow-wrap: anywhere;
}

/* PlayPro's plugin search (item 4.11): one row per plugin, apart as the old page's grid rows were. Names and
   descriptions come from the search source, so a long word wraps inside the card instead of widening it. */
#plugin-search-results article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
#plugin-search-results article:first-child {
  border-top: 0;
}
#plugin-search-results article > p {
  margin: 6px 0 0;
}
/* Three lines of the description in the list; the plugin's page shows it whole. */
#plugin-search-results article > p:first-of-type {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
#plugin-search-results article > p + p {
  color: var(--tx2);
  font-size: 12.5px;
}
#plugin-search-results .wf-button {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
#plugin-search-results,
#plugin-search-detail {
  overflow-wrap: anywhere;
}
#plugin-search-detail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
