/* The admin's frame: the sign-in gate, the target badge, the rail beside one screen, a screen's head and
   toolbar, and how the rail folds in narrow windows. Tokens and controls: style.css; the screens'
   content: screens.css. */

/* Sign-in gate --------------------------------------------------------------------------------- */

.gate { display: grid; place-items: center; min-height: 100%; padding: 24px; }
.gate-panel {
  display: grid;
  gap: 18px;
  width: min(400px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raise);
}
.gate-brand { display: flex; align-items: center; gap: 12px; }
.gate-brand h1 { font-size: 17px; line-height: 1.25; }
.gate-brand p { color: var(--text-3); font-size: 12.5px; }
.gate-target { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); font-size: 12.5px; }
.gate-target span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Continue with Discord: the gate's one action, 40px high, Discord's glyph before the words (as on
   the site's gates). */
.btn-discord { height: 40px; font-size: 14px; }
.btn-discord .discord-glyph { flex: none; }

.target-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-s);
  background: rgb(121 168 224 / 0.14);
  color: var(--info);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* The cloud project is the one players use: its badge stands out so nobody takes it for a test. */
.target-badge.is-cloud { background: rgb(240 145 58 / 0.16); color: var(--warn); }

/* The frame: the rail beside one screen ----------------------------------------------------------- */

.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: 100%; }

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--rail);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 22px; color: inherit; text-decoration: none; }
.brand-text { display: grid; min-width: 0; }
.brand-name { font: 600 14.5px/1.2 var(--font-display); white-space: nowrap; }
.brand-sub { color: var(--text-3); font-size: 12px; }

.rail-nav { display: grid; gap: 2px; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r);
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.rail-item .icon { color: var(--text-3); transition: color 150ms var(--ease); }
.rail-item:hover { background: rgb(255 255 255 / 0.045); color: var(--text); }
.rail-item[aria-current="page"] { background: var(--accent-wash); color: var(--text); }
.rail-item[aria-current="page"] .icon { color: var(--accent); }
.rail-item:focus-visible { outline-offset: -2px; }
.rail-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-count { color: var(--text-3); font-size: 12px; font-weight: 600; }
.rail-item[aria-current="page"] .rail-count { color: var(--accent); }
/* The live dot is drawn by ::before so the element that holds its screen-reader words has no fill. */
.rail-live::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--good-text); }

.rail-foot { display: grid; gap: 12px; margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.rail-target { display: grid; gap: 4px; min-width: 0; color: var(--text-3); font-size: 12px; }
.rail-target .target-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.rail-email { overflow: hidden; color: var(--text-2); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.rail-tz { color: var(--text-3); font-size: 12px; }

/* A screen: its head (title, what it holds, actions), the toolbar, then its body. Beside it, the pane
   when something is open (screens.css): the list keeps 2 parts of the width to the pane's 3, the list
   never under 316px and the pane never under 560px (939px windows and narrower stack them). */
.main { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); min-width: 0; min-height: 0; }
.main.with-pane { grid-template-columns: minmax(316px, 2fr) minmax(560px, 3fr); }
.screen { display: flex; flex-direction: column; grid-area: 1 / 1; min-width: 0; min-height: 0; }
.screen-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; padding: 22px var(--pad) 14px; }
.screen-title { display: grid; gap: 3px; min-width: 0; margin-right: auto; }
.screen-title h1 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.summary { color: var(--text-3); font-size: 13px; }
.summary strong { color: var(--text-2); font-weight: 600; }
.screen-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 0 var(--pad) 14px; }
.screen-body { position: relative; flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line); }

/* Narrower windows: the rail keeps its icons (each named on hover), then becomes a bar over the screen. */

@media (max-width: 1100px) {
  :root { --rail-w: 64px; }
  .rail { padding: 16px 10px 12px; }
  .brand { justify-content: center; padding: 0 0 18px; }
  .brand-text, .rail-label, .rail-count, .rail-target .target-url, .rail-email, .rail-tz { display: none; }
  .rail-item { position: relative; justify-content: center; width: 44px; padding: 0; }
  .rail-live { position: absolute; top: 7px; right: 8px; }
  .rail-foot { justify-items: center; padding: 12px 0 0; }
  .rail-user { justify-content: center; }
}

@media (max-width: 980px) {
  :root { --pad: 20px; }
}

@media (max-width: 640px) {
  :root { --rail-w: 0px; --pad: 14px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .rail { flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { padding: 0 6px 0 0; }
  .rail-nav { display: flex; gap: 2px; }
  .rail-item { flex: none; }
  .rail-foot { display: flex; margin: 0 0 0 auto; padding: 0; border: 0; }
  .rail-target { display: none; }
  .screen-head { padding-top: 16px; }
  .search { flex-basis: 100%; }
  .toasts { left: 14px; }
}

