@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  --bg-base:      #080c14;
  --bg-primary:   #0c1220;
  --bg-secondary: #111827;
  --bg-card:      #151e2e;
  --bg-card-alt:  #1a2540;
  --bg-hover:     #1e2d45;
  --border:       rgba(255,255,255,0.07);
  --border-mid:   rgba(255,255,255,0.11);
  --text-primary: #e8eef7;
  --text-secondary: #8fa3bc;
  --text-muted:   #4a6180;
  --accent:       #f97316;
  --accent-glow:  rgba(249,115,22,0.25);
  --accent-purple: #8b5cf6;
  --accent-green:  #22d3a4;
  --accent-blue:   #3b9ef6;
  --accent-red:    #f45060;
  --sidebar-width: 248px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: inherit;
  line-height: 1;
  user-select: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Loading ───────────────────────────────── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  background: var(--bg-base);
}
.loading-logo {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.loading-logo img { width: 100%; height: 100%; object-fit: contain; }
.loading-logo-fallback {
  font-size: 48px;
  line-height: 1;
}
.loading-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login ─────────────────────────────────── */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(249,115,22,0.08) 0%, transparent 70%),
    var(--bg-base);
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo-wrap {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
}
.login-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.login-logo-fallback {
  font-size: 52px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px;
}
.login-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.login-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.login-desc {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 28px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.login-footer {
  margin-top: 28px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn .material-symbols-rounded { font-size: 16px; }

.btn-github {
  background: #1c2128;
  color: #e6edf3;
  border: 1px solid #30363d;
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-size: 14px;
  border-radius: var(--radius-md);
}
.btn-github:hover { background: #262d36; border-color: #444c56; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: all 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: #fb8334;
  box-shadow: 0 0 18px var(--accent-glow);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-mid);
}
.btn-secondary:hover { background: rgba(255,255,255,0.09); color: var(--text-primary); }

.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #e03349; }

.btn-sm { padding: 5px 13px; font-size: 12px; }
.btn-sm .material-symbols-rounded { font-size: 15px; }

.btn-icon {
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.btn-icon .material-symbols-rounded { font-size: 16px; }
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-mid); }

/* ── App layout ────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}
.sidebar-logo-fallback {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.sidebar-version {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  font-weight: 500;
}

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }

.nav-section { margin-bottom: 20px; }
.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.nav-item .nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 22px; flex-shrink: 0;
}
.nav-item .nav-icon .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.nav-item:hover .nav-icon .material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.nav-item.active {
  background: rgba(249,115,22,0.1);
  color: var(--accent);
}
.nav-item.active .nav-icon .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border-mid);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }
.user-role { font-size: 10px; color: var(--text-muted); margin-top: 1px; }

/* ── Main content ──────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-primary);
}

.page-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12,18,32,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.page-header-left { flex: 1; min-width: 0; }
.page-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title .material-symbols-rounded {
  font-size: 20px;
  color: var(--accent);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.page-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0;
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.page-body { padding: 24px 28px; }

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-mid); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Stat cards ────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
  background: radial-gradient(circle at 50% 0%, var(--glow-color, transparent) 0%, transparent 70%);
}
.stat-card:hover { border-color: var(--border-mid); transform: translateY(-1px); }
.stat-card:hover::after { opacity: 1; }
.stat-card.orange { --glow-color: rgba(249,115,22,0.12); }
.stat-card.purple { --glow-color: rgba(139,92,246,0.12); }
.stat-card.blue   { --glow-color: rgba(59,158,246,0.12); }
.stat-card.green  { --glow-color: rgba(34,211,164,0.12); }

.stat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: opacity 0.2s;
}
.stat-card.orange::before { background: linear-gradient(90deg, var(--accent), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--accent-purple), transparent); }
.stat-card.blue::before   { background: linear-gradient(90deg, var(--accent-blue), transparent); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--accent-green), transparent); }

.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.stat-icon .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.stat-card.orange .stat-icon .material-symbols-rounded { color: var(--accent); }
.stat-card.purple .stat-icon .material-symbols-rounded { color: var(--accent-purple); }
.stat-card.blue   .stat-icon .material-symbols-rounded { color: var(--accent-blue); }
.stat-card.green  .stat-icon .material-symbols-rounded { color: var(--accent-green); }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Grid ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── List items ─────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.12s;
}
.list-item:hover { background: rgba(255,255,255,0.04); }

.list-item-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.list-item-icon .material-symbols-rounded {
  font-size: 17px;
  color: var(--accent);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.list-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: monospace; }
.list-item-actions { display: flex; gap: 6px; }

.divider { height: 1px; background: var(--border); }

/* ── Editor ─────────────────────────────────── */
.editor-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 61px);
}
.editor-body { flex: 1; display: flex; overflow: hidden; }
.code-editor {
  flex: 1;
  background: #070b14;
  color: #cdd9e5;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 22px 24px;
  border: none;
  outline: none;
  resize: none;
  tab-size: 2;
  width: 100%;
}
.preview-panel {
  flex: 1;
  border-left: 1px solid var(--border);
  padding: 28px;
  overflow-y: auto;
  background: var(--bg-primary);
  display: none;
}
.preview-panel h1 { font-size: 22px; margin: 0 0 16px; letter-spacing: -0.03em; }
.preview-panel h2 { font-size: 18px; margin: 28px 0 12px; letter-spacing: -0.02em; }
.preview-panel h3 { font-size: 15px; margin: 22px 0 10px; letter-spacing: -0.01em; }
.preview-panel p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; }
.preview-panel code {
  background: var(--bg-card);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
  font-family: monospace;
  border: 1px solid var(--border);
}
.preview-panel pre {
  background: #070b14;
  padding: 18px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.preview-panel pre code { background: none; padding: 0; color: #cdd9e5; border: none; }
.preview-panel ul, .preview-panel ol { padding-left: 20px; color: var(--text-secondary); margin-bottom: 14px; }
.preview-panel li { margin-bottom: 5px; line-height: 1.65; }
.preview-panel table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
.preview-panel th, .preview-panel td { padding: 9px 12px; border: 1px solid var(--border); }
.preview-panel th { background: var(--bg-card); font-weight: 600; }
.preview-panel blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 14px;
}
.preview-panel a { color: var(--accent-blue); }

/* ── Roles ──────────────────────────────────── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.role-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--role-color, var(--accent));
}
.role-card:hover { border-color: var(--border-mid); transform: translateY(-1px); }
.role-card-header {
  padding: 16px 16px 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.role-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.role-name { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.role-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.role-card-body { padding: 0 16px 16px 20px; }
.skill-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.skill-badge {
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; gap: 3px;
}
.skill-badge .material-symbols-rounded { font-size: 12px; }
.skill-badge.active {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.25);
  color: var(--accent);
}
.skill-badge.active .material-symbols-rounded { color: var(--accent); }

/* ── Team table ─────────────────────────────── */
.team-table { width: 100%; border-collapse: collapse; }
.team-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.team-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.team-table tr:last-child td { border-bottom: none; }
.team-table tr:hover td { background: rgba(255,255,255,0.02); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Commits ─────────────────────────────────── */
.commit-list { display: flex; flex-direction: column; }
.commit-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.commit-item:last-child { border-bottom: none; }
.commit-item:hover { background: rgba(255,255,255,0.02); }
.commit-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.commit-avatar img { width: 100%; height: 100%; object-fit: cover; }
.commit-avatar-fallback {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.commit-body { flex: 1; min-width: 0; }
.commit-message {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.commit-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.commit-sha {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 10.5px;
  color: var(--accent-blue);
  background: rgba(59,158,246,0.08);
  border: 1px solid rgba(59,158,246,0.15);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  flex-shrink: 0;
  align-self: center;
  transition: background 0.12s;
}
.commit-sha:hover { background: rgba(59,158,246,0.15); }

/* ── Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayIn 0.15s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.6);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }

/* ── Form ───────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 80px; }

/* ── Toast ──────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 0.22s cubic-bezier(0.175,0.885,0.32,1.275);
  pointer-events: all;
}
.toast .material-symbols-rounded {
  font-size: 17px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  flex-shrink: 0;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.success .material-symbols-rounded { color: var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-red); }
.toast.error   .material-symbols-rounded { color: var(--accent-red); }
.toast.info    { border-left: 3px solid var(--accent-blue); }
.toast.info    .material-symbols-rounded { color: var(--accent-blue); }
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Tab nav ────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.tab-item {
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border: none;
  background: none;
  font-family: inherit;
  transition: all 0.12s;
}
.tab-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.tab-item:hover:not(.active) { color: var(--text-secondary); }

/* ── Breadcrumb ─────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.breadcrumb-link { color: var(--text-secondary); cursor: pointer; font-weight: 500; }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); font-size: 13px; }

/* ── Empty state ────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-secondary);
}
.empty-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.empty-icon .material-symbols-rounded {
  font-size: 26px;
  color: var(--text-muted);
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.empty-desc { font-size: 13px; color: var(--text-muted); }

/* ── Error banner ───────────────────────────── */
.error-banner {
  background: rgba(244,80,96,0.08);
  border: 1px solid rgba(244,80,96,0.25);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--accent-red);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-banner .material-symbols-rounded {
  font-size: 18px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  flex-shrink: 0;
}

/* ── Utilities ──────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 12px; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }

/* ── Projects grid ──────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.project-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.project-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.project-icon .material-symbols-rounded {
  font-size: 22px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.project-card-info { flex: 1; min-width: 0; }
.project-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.project-repo {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.project-member-count {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}
.project-member-count .material-symbols-rounded { font-size: 13px; }

/* ── Project detail ──────────────────────────── */
.project-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.project-meta-row:last-child { border-bottom: none; }
.project-meta-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  min-width: 72px;
  flex-shrink: 0;
}

.project-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.project-link-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-color: var(--border-mid);
}
.project-link-item .material-symbols-rounded:first-child {
  font-size: 17px;
  color: var(--accent);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.project-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Scrollbar ──────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
