/* Collection · Knowledge & Resources Hub — Alegra */
:root {
  --alegra: #00b19d;
  --alegra-dark: #009184;
  --alegra-soft: #e6f7f4;
  --navy: #0e2a36;
  --ink: #16323d;
  --muted: #61798a;
  --line: #e2eaee;
  --bg: #f6f9fa;
  --white: #fff;
  --amber: #f5a623;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 42, 54, .06), 0 8px 24px -12px rgba(14, 42, 54, .18);
  --shadow-lg: 0 16px 48px -16px rgba(14, 42, 54, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 18px; min-height: 68px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--alegra), #35d6bd);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand-text { line-height: 1.1; }
.brand-alegra { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-name { font-size: 14.5px; font-weight: 700; color: var(--navy); line-height: 1.25; max-width: 230px; }

.nav { display: flex; gap: 1px; margin-left: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
  padding: 7px 9px; border-radius: 9px; font-size: 13.5px; color: var(--muted); font-weight: 500; white-space: nowrap;
  transition: .15s;
}
.nav a:hover { background: var(--alegra-soft); color: var(--alegra-dark); }
.nav a.active { background: var(--navy); color: #fff; }

.search-box { position: relative; flex-shrink: 0; }
.search-box input {
  width: 260px; padding: 9px 12px 9px 34px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); font-size: 14px; outline: none; color: var(--ink);
}
.search-box input:focus { border-color: var(--alegra); box-shadow: 0 0 0 3px rgba(0, 177, 157, .15); }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: .45; font-size: 13px; }
.user-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: 16px; flex-shrink: 0;
}
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.3; }
.user-chip .plan { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.user-chip .plan.on { color: var(--alegra); }
.signout {
  border: 1px solid var(--line); background: var(--white); color: var(--muted);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.signout:hover { border-color: var(--alegra); color: var(--alegra); }

/* ---------- Login ---------- */
.login {
  min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 48px 20px;
  background: radial-gradient(900px 400px at 50% -20%, rgba(0, 177, 157, .18), transparent 60%);
}
.login-card {
  width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px 32px; box-shadow: 0 18px 50px rgba(9, 38, 51, .08);
  display: flex; flex-direction: column; gap: 10px; text-align: left;
}
.brand-mark.big { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; margin-bottom: 6px; }
.login-card h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.login-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-card label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.login-card input {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; outline: none; color: var(--ink);
}
.login-card input:focus { border-color: var(--alegra); box-shadow: 0 0 0 3px rgba(0, 177, 157, .15); }
.login-card .btn { justify-content: center; margin-top: 6px; }
.login-card small { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin-top: 4px; }
.login-error { background: #fff1f0; border: 1px solid #ffccc7; color: #a8071a; font-size: 13px; padding: 9px 12px; border-radius: 9px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1000px 420px at 12% -30%, rgba(0, 177, 157, .22), transparent 60%), var(--navy);
  color: #fff; padding: 76px 0 84px;
}
.hero h1 { font-size: 66px; margin: 0; letter-spacing: -.03em; font-weight: 800; }
.hero .sub { margin: 10px 0 0; font-size: 21px; color: #7fe3d3; font-weight: 600; }
.hero p { margin: 18px 0 0; max-width: 620px; color: #b9cdd6; font-size: 16px; line-height: 1.65; }
.hero-stats { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div span { display: block; font-size: 28px; font-weight: 700; }
.hero-stats div small { color: #8fa9b5; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Page chrome ---------- */
.page { padding: 34px 0 80px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--alegra-dark); }
.crumbs span.sep { opacity: .45; }
.crumbs .cur { color: var(--ink); font-weight: 600; }

.page-title { font-size: 30px; margin: 0 0 6px; letter-spacing: -.02em; color: var(--navy); }
.page-desc { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.section-title { font-size: 18px; margin: 34px 0 14px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.section-title small { font-weight: 500; color: var(--muted); font-size: 13px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-lg { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfe6e1; }
.card h3 { margin: 0; font-size: 16px; color: var(--navy); line-height: 1.35; }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.card-ic { font-size: 24px; }
.card-owner { font-size: 12.5px; color: var(--muted); }
.card-owner b { color: var(--ink); font-weight: 600; }

.hub-card { cursor: pointer; padding: 22px; }
.hub-card .card-ic { font-size: 30px; }
.hub-card h3 { font-size: 17px; }
.hub-card .go { color: var(--alegra-dark); font-size: 13px; font-weight: 600; }

.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #eef4f6;
  color: var(--muted); font-weight: 600; letter-spacing: .01em;
}
.tag.team { background: var(--alegra-soft); color: var(--alegra-dark); }
.tag.status { background: #fff3df; color: #a06a08; }

.card-actions { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; transition: .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--alegra); color: var(--alegra-dark); }
.btn-primary { background: var(--alegra); border-color: var(--alegra); color: #fff; }
.btn-primary:hover { background: var(--alegra-dark); border-color: var(--alegra-dark); color: #fff; }
.btn-lock { background: #fff8ec; border-color: #f3ddb4; color: #a06a08; }
.btn-lock:hover { border-color: var(--amber); color: #8a5a06; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 26px; }
.fgroup { display: flex; flex-direction: column; gap: 7px; }
.fgroup label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 6px 13px; font-size: 13px; color: var(--muted); font-weight: 500; transition: .15s;
}
.chip:hover { border-color: var(--alegra); color: var(--alegra-dark); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters .btn-ghost { margin-left: auto; }

.result-count { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty b { display: block; color: var(--navy); font-size: 17px; margin-bottom: 6px; }

/* ---------- Guides ---------- */
.guide { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.guide h3 { margin: 0 0 4px; font-size: 18px; color: var(--navy); }
.guide > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.steps li { display: flex; gap: 12px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
  background: var(--alegra-soft); color: var(--alegra-dark);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.steps b { display: block; font-size: 14px; color: var(--navy); }
.steps span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(14, 42, 54, .55); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px; z-index: 80;
}
.overlay[hidden] { display: none; }
.modal {
  background: var(--white); border-radius: 18px; max-width: 640px; width: 100%;
  max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg); padding: 28px;
}
.modal h2 { margin: 0 0 6px; font-size: 23px; color: var(--navy); letter-spacing: -.01em; }
.modal .lead { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.x { border: none; background: #f1f5f7; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); font-size: 16px; }
.x:hover { background: #e6edf0; color: var(--ink); }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 18px 0; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; color: var(--ink); }
.modal ul.bul { margin: 6px 0 0; padding-left: 18px; color: var(--ink); font-size: 14px; line-height: 1.7; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }

.locked-box { text-align: center; padding: 10px 0 4px; }
.locked-box .ic { font-size: 40px; }
.locked-box h2 { margin: 12px 0 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--white); padding: 26px 0; font-size: 13px; color: var(--muted); }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .hero h1 { font-size: 48px; }
  .search-box input { width: 190px; }
  .header-in { height: auto; padding: 12px 0; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 38px; }
  .dl { grid-template-columns: 1fr; gap: 4px 0; }
  .dl dd { margin-bottom: 8px; }
  .user-chip .who { display: none; }
}

/* ---------- MCP ---------- */
.mcp {
  margin-top: 28px; padding: 22px 24px; border-radius: 16px;
  border: 1px dashed rgba(0, 0, 0, .12); background: #fff;
}
.mcp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mcp-head .ic { font-size: 20px; }
.mcp-head h3 { margin: 0; font-size: 17px; color: var(--navy); }
.mcp p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.mcp .bul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.mcp .bul li { margin: 4px 0; }
.mcp-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.mcp-foot code { background: rgba(0, 0, 0, .05); padding: 2px 6px; border-radius: 6px; }

.hub-card.soon{opacity:.6;cursor:default}
