@charset "UTF-8";

:root {
  color-scheme: dark;
  --background: #101212;
  --surface: #191c1b;
  --surface-raised: #202421;
  --border: #343a34;
  --text: #f3f1e9;
  --muted: #a8b0a6;
  --gold: #d9b66f;
  --green: #9bc5a1;
  --danger: #ffb1a6;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-width: 280px; min-height: 100%; background: var(--background); color: var(--text); }
body { font-size: 16px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button { border-radius: 8px; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; background: var(--gold); color: var(--background); padding: 12px 16px; border-radius: 6px; }
.skip-link:focus { top: 10px; }
.loading-view { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.loading-ring { width: 30px; height: 30px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.login-view { min-height: 100svh; padding: 60px 6vw; display: grid; place-items: center; background: radial-gradient(ellipse at 17% 24%, #77734714, transparent 48%), linear-gradient(135deg, #191d18, #101212 65%); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .85fr); gap: clamp(48px, 7vw, 130px); align-items: center; width: 100%; max-width: 1160px; }
.wordmark { display: flex; align-items: center; gap: 14px; font-size: 21px; font-weight: 650; letter-spacing: .26em; color: var(--gold); }
.eye { flex: 0 0 auto; width: 49px; height: 49px; }
.eyebrow { color: var(--gold); font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; margin: 58px 0 19px; }
h1 { font-size: clamp(44px, 4.5vw, 66px); line-height: 1.09; font-weight: 500; letter-spacing: -.055em; margin: 0; }
h1 span { color: var(--gold); }
.intro-description { font-size: 17px; line-height: 1.7; color: var(--muted); margin: 24px 0 30px; }
.capabilities { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: #d5dbd0; }
.capabilities > span { display: inline-flex; align-items: center; gap: 8px; }
.small-icon { color: var(--gold); font-size: 18px; }
.terminal-icon { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 600; }
.domain-label { color: #868f83; font-size: 12px; margin: 70px 0 0; letter-spacing: .015em; }
.domain-label span { color: var(--gold); margin: 0 12px; }
.login-card { border: 1px solid #3d4337; border-radius: 18px; background: linear-gradient(155deg, #262b23, #191d1a 74%); padding: clamp(28px, 3vw, 43px); box-shadow: 0 28px 70px #00000035; }
.restricted-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); }
.gold-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
h2 { font-size: 29px; letter-spacing: -.03em; font-weight: 500; margin: 30px 0 12px; }
.card-description { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 29px; }
label { display: block; margin-bottom: 9px; color: #d9ded3; font-size: 13px; font-weight: 550; }
.passphrase-field { position: relative; }
.passphrase-field input { width: 100%; min-height: 52px; border: 1px solid #485042; border-radius: 7px; padding: 12px 75px 12px 14px; color: var(--text); background: #101410; transition: border-color .15s; }
.passphrase-field input:hover { border-color: #7d846f; }
.show-passphrase { position: absolute; right: 6px; top: 6px; min-width: 58px; min-height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.show-passphrase:hover { color: var(--text); background: #ffffff08; }
.form-message { margin: 10px 0 16px; min-height: 20px; font-size: 13px; line-height: 1.5; color: var(--danger); }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 52px; padding: 13px 17px; border: 1px solid var(--gold); background: var(--gold); color: #1a2017; font-size: 15px; font-weight: 650; }
.primary-button:hover { background: #e7c886; border-color: #e7c886; }
.primary-button > span:last-child { font-size: 21px; line-height: 1; }
.login-footnote { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #343b30; color: #949e8e; font-size: 12px; line-height: 1.6; }

.app-view { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 500px; max-width: 1800px; margin: 0 auto; padding: 0 clamp(12px, 2vw, 32px); }
.app-header { flex: 0 0 auto; min-height: 87px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-group, .header-actions { display: flex; align-items: center; gap: 24px; }
.wordmark.compact { font-size: 17px; gap: 9px; }
.compact .eye { width: 36px; height: 36px; }
.header-divider { height: 23px; width: 1px; background: var(--border); }
.control-label { color: #b9c0b4; font-size: 14px; }
.connection-state { color: var(--green); display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.connection-state.interrupted { color: var(--gold); }
.secondary-button { min-height: 38px; padding: 8px 13px; border: 1px solid #424a3c; background: transparent; color: #d7ddcf; font-size: 12px; }
.secondary-button:hover { background: #232820; border-color: #68745a; }
.status-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; flex: 0 0 auto; gap: 10px; padding: 19px 24px; background: #1a1e18; border: 1px solid #343c2d; border-radius: 10px; margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; gap: 8px; min-width: 0; border-right: 1px solid #343b2e; padding-right: 14px; padding-left: 14px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border: 0; }
.stat-label { color: #99a28f; font-size: 11px; }
.stat-value { color: #e1e8d9; font-size: 14px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.stat-value.hostname { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.workspace { display: flex; flex-direction: column; flex: 1 1 0; min-height: 250px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 18px 0 12px; border-bottom: 1px solid var(--border); }
.tabs { display: flex; align-self: stretch; align-items: stretch; gap: 6px; }
.tab { position: relative; display: flex; justify-content: center; align-items: center; gap: 8px; min-width: 112px; border: 0; border-radius: 0; padding: 14px 17px; color: var(--muted); background: transparent; font-size: 14px; }
.tab[aria-selected="true"] { color: var(--gold); }
.tab[aria-selected="true"]::after { position: absolute; content: ""; bottom: -1px; left: 14px; right: 14px; height: 2px; background: var(--gold); }
.tab:hover { background: #ffffff04; color: var(--text); }
.tab:focus-visible { outline-offset: -6px; }
.fullscreen-link { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; color: #c9d0c3; font-size: 12px; text-decoration: none; white-space: nowrap; }
.fullscreen-link:hover { color: var(--gold); }
.workspace-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto; min-height: 40px; padding: 8px 19px; background: #151814; border-bottom: 1px solid #30362d; }
.workspace-caption p { margin: 0; font-size: 12px; line-height: 1.6; color: #aab39f; }
.root-label { white-space: nowrap; padding: 3px 7px; border: 1px solid #75613a; border-radius: 4px; font-size: 10px; color: var(--gold); }
.workspace-panel { display: flex; flex: 1 1 0; min-height: 0; background: #101212; }
.workspace-panel iframe { display: block; width: 100%; height: 100%; min-height: 0; border: 0; color-scheme: dark; }
.app-message { margin: 0; padding: 10px 18px; flex: 0 0 auto; font-size: 12px; line-height: 1.5; color: var(--gold); background: #302b1c; border-bottom: 1px solid #625436; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px max(12px, env(safe-area-inset-bottom)); flex: 0 0 auto; color: #899381; font-size: 10px; }
.noscript-message { position: fixed; inset: 0; display: grid; place-items: center; padding: 30px; background: var(--background); }

@media (max-width: 820px) {
  .login-view { padding: 36px 28px; }
  .login-layout { max-width: 480px; grid-template-columns: 1fr; gap: 32px; }
  .eyebrow { margin-top: 28px; margin-bottom: 12px; }
  h1 { font-size: 42px; }
  h1 br { display: none; }
  .intro-description { font-size: 15px; margin: 16px 0 0; }
  .capabilities, .domain-label { display: none; }
  .login-card { padding: 28px; }
  .header-divider, .control-label { display: none; }
  .header-actions { gap: 16px; }
  .status-strip { padding: 14px; margin-bottom: 14px; }
  .stat { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 520px) {
  .login-view { padding: 25px 20px; }
  .login-layout { gap: 25px; }
  .wordmark { font-size: 18px; }
  .eye { width: 40px; height: 40px; }
  h1 { font-size: 35px; max-width: 350px; }
  .eyebrow { font-size: 10px; margin-top: 24px; }
  .login-card { padding: 24px; border-radius: 12px; }
  h2 { font-size: 26px; margin-top: 22px; }
  .card-description { margin-bottom: 24px; }
  .app-view { padding: 0 9px; }
  .app-header { min-height: 67px; gap: 8px; }
  .wordmark.compact { font-size: 14px; gap: 5px; }
  .compact .eye { width: 30px; height: 30px; }
  .header-actions { gap: 10px; }
  .connection-state { font-size: 10px; }
  .secondary-button { padding: 7px 9px; font-size: 11px; }
  .status-strip { grid-template-columns: 1.2fr 1fr; row-gap: 15px; padding: 13px 15px; margin-bottom: 10px; }
  .stat { padding-left: 0; }
  .stat:nth-child(even) { border: 0; padding-left: 9px; }
  .stat-label { font-size: 10px; }
  .stat-value, .stat-value.hostname { font-size: 12px; }
  .workspace { border-radius: 8px; }
  .workspace-toolbar { min-height: 51px; padding: 0 11px 4px 2px; gap: 3px; flex-wrap: wrap; }
  .tabs { gap: 0; }
  .tab { min-width: 82px; padding: 12px 9px; font-size: 12px; gap: 5px; }
  .tab[aria-selected="true"]::after { left: 9px; right: 9px; }
  .fullscreen-link { gap: 5px; font-size: 10px; margin-left: auto; }
  .workspace-caption { padding: 8px 11px; gap: 8px; }
  .workspace-caption p { font-size: 11px; }
  .root-label { font-size: 9px; }
}

@media (max-width: 370px) {
  .connection-state { display: none; }
  .login-view { padding: 24px 14px; }
  .login-card { padding: 22px; }
  .fullscreen-link { font-size: 9px; }
  .tab { min-width: 75px; }
  .app-footer { font-size: 9px; }
}

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