/* Zephyrian 门户 — GitHub 设计语言,与 nempoi / robovan 视觉一致 */

:root {
  --gh-bg-canvas: #f6f8fa;
  --gh-bg: #ffffff;
  --gh-fg: #1f2328;
  --gh-fg-muted: #656d76;
  --gh-fg-subtle: #9ba1a8;
  --gh-border: #d0d7de;
  --gh-border-muted: #d8dee4;
  --gh-accent: #0969da;
  --gh-success: #1f883d;
  --gh-danger: #cf222e;
  --gh-radius: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5;
  background: var(--gh-bg-canvas); color: var(--gh-fg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
}

.page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}

/* ── 登录页 ────────────────────────────────── */
#login-view {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  box-shadow: 0 1px 0 rgba(31,35,40,.04);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 28px 24px;
}

.brand { text-align: center; margin-bottom: 22px; }
.brand-logo {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: #ddf4ff;
  color: var(--gh-accent);
  display: flex; align-items: center; justify-content: center;
}
.brand h1 {
  margin: 0 0 4px;
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.3px;
}
.brand-sub {
  margin: 0;
  font-size: 13px;
  color: var(--gh-fg-muted);
}

#login-form label {
  display: block;
  margin-bottom: 14px;
}
.label {
  display: block;
  font-size: 13px;
  color: var(--gh-fg-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
#login-form input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  font-size: 14px;
  color: var(--gh-fg);
  background: var(--gh-bg);
  transition: border-color .15s, box-shadow .15s;
}
#login-form input:focus {
  outline: none;
  border-color: var(--gh-accent);
  box-shadow: 0 0 0 3px rgba(9,105,218,.2);
}

.btn {
  display: block;
  width: 100%;
  height: 40px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  background: var(--gh-bg);
  color: var(--gh-fg);
}
.btn:hover { background: #f3f4f6; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--gh-success);
  border-color: rgba(31,136,61,.4);
  color: #ffffff;
}
.btn-primary:hover { background: #1a7f37; }

.err {
  margin-top: 12px;
  padding: 8px 10px;
  background: #ffebe9;
  border: 1px solid rgba(207,34,46,.4);
  border-radius: var(--gh-radius);
  color: var(--gh-danger);
  font-size: 12px;
  text-align: center;
}

.divider {
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gh-border-muted);
}
.divider span {
  font-size: 12px;
  color: var(--gh-fg-subtle);
}

.btn-feishu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gh-fg);
  background: var(--gh-bg);
}
.btn-feishu svg { color: var(--gh-fg-muted); }
.btn-feishu:hover { background: #f3f4f6; border-color: var(--gh-accent); }
.btn-feishu:hover svg { color: var(--gh-accent); }

.hint {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--gh-border-muted);
  text-align: center;
  font-size: 12px;
  color: var(--gh-fg-muted);
}
.hint a { color: var(--gh-accent); text-decoration: none; }
.hint a:hover { text-decoration: underline; }

/* ── 应用选择页 ──────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--gh-bg);
  border-bottom: 1px solid var(--gh-border);
}
.topbar-brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gh-fg-muted);
}
.role-tag {
  padding: 2px 8px;
  border-radius: 12px;
  background: #ddf4ff;
  color: var(--gh-accent);
  font-size: 11px;
  font-weight: 600;
}
.link-btn {
  border: none;
  background: transparent;
  color: var(--gh-accent);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s;
}
.link-btn:hover { background: #ddf4ff; }

.apps-main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 24px 24px;
  flex: 1;
}
.apps-title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  color: var(--gh-fg);
}
.apps-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--gh-bg);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  text-decoration: none;
  color: var(--gh-fg);
  transition: all .15s;
  box-shadow: 0 1px 0 rgba(31,35,40,.04);
}
.app-tile:hover {
  border-color: var(--gh-accent);
  background: #f6f8fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,35,40,.08);
}
.app-tile-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: var(--gh-radius);
  background: #ddf4ff;
  color: var(--gh-accent);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.app-tile:hover .app-tile-icon {
  background: var(--gh-accent);
  color: #ffffff;
}
.app-tile-body { flex: 1; min-width: 0; }
.app-tile-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.app-tile-desc {
  font-size: 13px;
  color: var(--gh-fg-muted);
  line-height: 1.4;
}
.app-tile-arrow {
  font-size: 22px;
  color: var(--gh-fg-muted);
  font-weight: 300;
  transition: transform .15s, color .15s;
}
.app-tile:hover .app-tile-arrow {
  color: var(--gh-accent);
  transform: translateX(4px);
}

.empty {
  padding: 32px 20px;
  text-align: center;
  background: #fff8e1;
  border: 1px solid #f0b429;
  border-radius: var(--gh-radius);
  color: #5a4200;
  font-size: 13px;
}

/* ── 底部 ──────────────────────────────── */
.foot {
  padding: 16px 0;
  text-align: center;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.foot a {
  color: var(--gh-fg-subtle);
  text-decoration: none;
}
.foot a:hover { color: var(--gh-fg-muted); }

/* ── 移动端 ────────────────────────────── */
@media (max-width: 600px) {
  .login-card { padding: 24px 20px 18px; }
  .brand h1 { font-size: 22px; }
  .topbar { padding: 10px 16px; }
  .topbar-user { gap: 8px; font-size: 12px; }
  .role-tag { font-size: 10px; padding: 2px 6px; }
  .apps-main { padding: 32px 16px 16px; }
  .apps-title { font-size: 16px; margin-bottom: 18px; }
  .app-tile { padding: 14px 16px; gap: 12px; }
  .app-tile-icon { width: 44px; height: 44px; }
  .app-tile-icon svg { width: 28px; height: 28px; }
  .app-tile-name { font-size: 15px; }
  .app-tile-desc { font-size: 12px; }
}
