/* Extra styles for the hub in a browser (server/index.js adds this after styles.css). */

/* No window controls in a browser: the drag strip is just empty space. */
body[data-web] .titlebar { -webkit-app-region: no-drag; }

.sidebar { display: flex; flex-direction: column; }
.web-logout { margin-top: auto; padding: 8px 0 12px; }
.web-logout .nav-item { width: 100%; opacity: 0.7; }
.web-logout .nav-item:hover { opacity: 1; }

/* ---------- File / lecture viewer ---------- */
.web-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 32px;
}
.web-viewer-card {
  width: min(900px, 100%);
  height: min(82vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  color: var(--text, #1d1d1f);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.web-viewer-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--separator, rgba(0, 0, 0, 0.1));
}
.web-viewer-card header strong { display: block; font-size: 15px; }
.web-viewer-card header span { display: block; font-size: 12px; color: var(--text-2, #666); margin-top: 2px; }
.web-viewer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.web-viewer-body { flex: 1; min-height: 0; display: flex; }
.web-viewer-body pre,
.web-viewer-body textarea {
  flex: 1;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: inherit;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.web-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(30, 30, 32, 0.92);
  color: #fff;
  font-size: 13px;
  max-width: 90vw;
}

/* ---------- Login page ---------- */
.login-body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f5f7;
  color: #1d1d1f;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.login-card {
  width: min(340px, calc(100vw - 48px));
  padding: 32px 28px 28px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
}
.login-card img { width: 56px; height: 56px; border-radius: 13px; }
.login-card h1 { font-size: 21px; margin: 14px 0 20px; font-weight: 600; }
.login-card input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  border: 1px solid rgba(60, 60, 67, 0.2);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}
.login-card input:focus { outline: 3px solid rgba(10, 132, 255, 0.35); border-color: #0a84ff; }
.login-card button {
  width: 100%;
  height: 44px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: #0a84ff;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:active { background: #0071e3; }
.login-error { min-height: 20px; margin: 12px 0 0; color: #e5383b; font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .login-body { background: #000; color: #f5f5f7; }
  .login-card { background: #1c1c1e; }
  .login-card input { background: #2c2c2e; border-color: rgba(255, 255, 255, 0.12); }
}
