:root {
  --navy: #001133;
  --blue: #1846d6;
  --bright: #2058f8;
  --ink: #2b3a5c;
  --muted: #4a5b80;
  --line: #d6e1fa;
  --soft: #eef3ff;
  --bg: #f4f7fd;
  --white: #fff;
  --danger: #8f1d2c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--blue); }
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  color: var(--white);
  padding: 14px 24px;
}
.banner { background: var(--navy); color: var(--white); padding: 8px 24px 64px; }
.top-row, .wrap { max-width: 1120px; margin: 0 auto; }
.top-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }
.brand span { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  color: var(--white); background: none; border: 0; font: inherit; font-size: 14px;
  cursor: pointer; text-decoration: none;
}
.hero { max-width: 1120px; margin: 22px auto 0; }
.hero h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: -0.03em; font-weight: 600; }
.hero p { margin: 0; max-width: 640px; color: #d5def4; }
.panel {
  background: var(--white);
  border-radius: 18px;
  border-top: 4px solid var(--bright);
  box-shadow: 0 16px 40px rgba(0, 17, 51, 0.1);
  padding: 22px;
  margin: 28px auto;
  max-width: 1120px;
  position: relative;
}
.banner + .panel { margin-top: -42px; }
.search { display: flex; gap: 10px; align-items: center; }
.search button { flex-shrink: 0; }
.search-field { position: relative; flex: 1; }
.search input {
  width: 100%; font: inherit; font-size: 16px; padding: 14px 16px 14px 46px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--navy); outline: none;
}
.search input:focus { border-color: var(--bright); }
.search svg { position: absolute; left: 16px; top: 15px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--white); border-radius: 12px; overflow: auto; max-height: 320px;
  box-shadow: 0 16px 36px rgba(0, 17, 51, 0.16);
}
.suggest a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
  color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line);
}
.suggest a span { color: var(--muted); font-size: 12px; font-weight: 400; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--soft); }
.filters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 18px; }
.filters label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.filters select, .field input, .field select, .field textarea {
  font: inherit; font-size: 14px; color: var(--navy); padding: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white); width: 100%;
}
.filters select {
  width: 100%;
  font-size: 15px;
  padding: 12px 44px 12px 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%232058F8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
.field select {
  appearance: none;
  padding-right: 44px;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 L6 6.5 L11 1.5' fill='none' stroke='%232058F8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
.req::after { content: " *"; color: var(--bright); }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.bar a { font-size: 14px; font-weight: 500; }
.grid { max-width: 1120px; margin: 0 auto 48px; padding: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--white); border-radius: 16px; overflow: hidden; text-decoration: none;
  color: inherit; display: flex; flex-direction: column; border: 0;
  box-shadow: 0 8px 22px rgba(0, 17, 51, 0.07);
}
.card[hidden] { display: none !important; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0, 17, 51, 0.12); }
.thumb { position: relative; aspect-ratio: 16/9; background: var(--soft); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.thumb span { position: absolute; left: 12px; top: 12px; }
.thumb span, .type {
  background: var(--navy); color: var(--white); font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 999px;
}
.type { display: inline-block; margin: 0 0 12px; }
.card .body, .sheet { padding: 14px 14px 16px; }
.card h2, .sheet h2 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; color: var(--navy); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 4px 9px; border-radius: 6px; background: var(--soft); color: var(--blue); }
.tag.quiet { background: #eef2fb; color: var(--muted); }
.back { margin: 0 0 16px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--navy);
  font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 17, 51, 0.06);
}
.back-btn:hover { border-color: var(--bright); color: var(--blue); }
.page { max-width: 760px; margin: 28px auto 48px; position: relative; }
.page.panel { margin: 28px auto 48px; max-width: 760px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button, button.primary {
  display: inline-block; background: var(--bright); color: var(--white); text-decoration: none;
  border: 0; border-radius: 8px; padding: 10px 14px; font: inherit; font-weight: 500; cursor: pointer;
}
.button.secondary, button.secondary { background: var(--white); color: var(--navy); border: 1px solid var(--line); }
.button.danger, button.danger { background: var(--danger); }
.notice, .problem { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.notice { background: #eef6ff; color: var(--navy); }
.problem { background: #fdecef; color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 13px; color: var(--muted); }
.password-wrap { position: relative; display: block; }
.password-wrap input { width: 100%; padding-right: 44px; box-sizing: border-box; }
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 6px; line-height: 0; border-radius: 8px;
}
.password-toggle:hover { color: var(--navy); background: var(--soft); }
.login-card { max-width: 420px; margin: 48px auto; background: var(--white); border-radius: 14px; padding: 28px; box-shadow: 0 10px 30px rgba(0,17,51,.12); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.narrow { max-width: 1120px; margin: 0 auto 40px; padding: 0 16px; }
.more-wrap { max-width: 1120px; margin: 4px auto 48px; text-align: center; }
button.more { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 600; }
.manage { max-width: 1120px; margin: 28px auto 48px; }
.manage-head, .manage .actions { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.manage h2 { margin: 0 0 6px; }
.manage p { margin: 0; color: var(--muted); }
.manage-search { margin: 18px 0 8px; }
.manage .count { color: var(--muted); font-size: 13px; }
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr 1fr; }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  .grid, .filters { grid-template-columns: 1fr; }
  .search { flex-direction: column; align-items: stretch; }
  .top-row { align-items: flex-start; flex-direction: column; }
}
