:root {
  --uhg-blue: #1c2f72;
  --uhg-blue-dark: #13214f;
  --uhg-blue-soft: #2b67a3;
  --uhg-gold: #f3bd17;
  --text: #1b2235;
  --muted: #5f6b85;
  --bg: #f2f5fb;
  --card: #ffffff;
  --line: #d7dfef;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef2fa 100%);
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
}

a { color: var(--uhg-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1160px, 92vw); margin: 0 auto; }
.section { padding: 2rem 0; }

.site-header { background: linear-gradient(120deg, var(--uhg-blue-dark), var(--uhg-blue)); color: #fff; box-shadow: 0 8px 24px rgba(18, 35, 85, .18); }
.top-header {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
}
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; }
.brand img {
  width: auto;
  height: 74px;
  max-width: 260px;
  object-fit: contain;
}
.brand strong { display: block; font-size: 1.08rem; letter-spacing: .2px; }
.brand small { opacity: .92; }

.quick-contact { display: flex; flex-direction: column; gap: .2rem; text-align: right; font-size: .92rem; }
.quick-contact a, .quick-contact span { color: #fff; opacity: .95; }

.main-nav { background: rgba(15, 30, 80, .45); border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 2px solid var(--uhg-gold); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .72rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.nav-inner a, .link-btn {
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: .44rem .85rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.nav-inner a:hover, .nav-inner .active, .link-btn:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .16);
  text-decoration: none;
}
.logout-form { margin-left: auto; }
.link-btn { background: transparent; cursor: pointer; }

.alert {
  margin-top: 1rem;
  padding: .75rem .95rem;
  border-radius: .7rem;
  border: 1px solid transparent;
  font-weight: 500;
}
.alert-success { background: #e9f8ef; border-color: #9bdeaf; color: #226941; }
.alert-error { background: #fdecec; border-color: #f2b2b2; color: #8a1f1f; }
.alert-warning { background: #fff7df; border-color: #ecd48d; color: #825f06; }

.hero {
  background:
    radial-gradient(circle at 5% 20%, rgba(255, 255, 255, .22), transparent 40%),
    linear-gradient(130deg, #15255f, #1f3e82 58%, #2f78b7);
  color: #fff;
  padding: 2.4rem 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.35rem;
  align-items: center;
}
.hero h1 { margin: .2rem 0 .6rem; font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.18; }
.hero-kicker { color: var(--uhg-gold); font-weight: 700; letter-spacing: .28px; margin: 0; }
.hero-text { margin: 0 0 1rem; max-width: 62ch; opacity: .95; }
.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .6rem;
  margin-bottom: .9rem;
}
.hero-search input {
  border: 0;
  border-radius: .7rem;
  padding: .8rem .9rem;
}
.hero-search button {
  border: 0;
  border-radius: .7rem;
  background: var(--uhg-gold);
  color: #1f2d58;
  font-weight: 700;
  padding: 0 1.1rem;
  cursor: pointer;
}
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  gap: .7rem;
}
.hero-stats article {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: .85rem;
  padding: .85rem 1rem;
}
.hero-stats strong { display: block; font-size: 1.35rem; margin-bottom: .2rem; color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border-radius: .75rem;
  border: 1px solid var(--uhg-blue);
  padding: .56rem .94rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: .2s ease;
}
.btn-primary { background: var(--uhg-blue); color: #fff; }
.btn-primary:hover { background: var(--uhg-blue-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--uhg-blue); }
.btn-outline:hover { background: #e9f0ff; text-decoration: none; }
.btn-link { padding: 0; border: 0; font-weight: 700; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .9rem;
  margin-bottom: .9rem;
}
.section-head h2 { margin: 0; color: #1a2e67; font-size: 1.35rem; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}
.category-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--uhg-blue);
  border-radius: .85rem;
  padding: .92rem 1rem;
  text-decoration: none;
}
.category-card h3 { margin: 0 0 .35rem; font-size: 1.03rem; }
.category-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.category-card:hover { box-shadow: 0 12px 25px rgba(20, 46, 108, .08); text-decoration: none; }

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: 1rem;
}
.doc-card h3 { margin: .45rem 0 .5rem; font-size: 1.06rem; line-height: 1.35; }
.doc-card p { margin: 0 0 .65rem; color: #3f4a64; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  color: #5a698b;
  font-size: .9rem;
  margin-bottom: .5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .26rem .58rem;
  font-size: .78rem;
  color: var(--uhg-blue-dark);
  border: 1px solid #b8c9ec;
  background: #ecf3ff;
}

.filter-box, .form-grid {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}
.field { display: flex; flex-direction: column; gap: .3rem; }
.field.full, .actions.full { grid-column: 1 / -1; }
label { color: #2a3760; font-weight: 600; font-size: .92rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid #c6d4ed;
  border-radius: .65rem;
  padding: .63rem .7rem;
  background: #fff;
  color: #1b2235;
}
textarea { resize: vertical; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.detail-wrap {
  display: grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 1rem;
}
.detail-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: 1rem;
}
.detail-main h1 { margin: .5rem 0 .8rem; font-size: clamp(1.45rem, 2.8vw, 2rem); color: #13295f; }
.lead { color: #33405d; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem .8rem; margin: .95rem 0; }
.tags { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tags span { border: 1px solid #c1d0ea; background: #f3f7ff; color: #263768; border-radius: 999px; padding: .25rem .6rem; font-size: .85rem; }
.files { display: grid; gap: .6rem; }
.file-item {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: .75rem;
  padding: .7rem;
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  align-items: center;
}
.file-item small { display: block; color: #6a7899; }

.detail-side { display: grid; gap: .8rem; align-content: start; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: .95rem;
}
.card h3 { margin: 0 0 .65rem; color: #1d2f72; }
.share-actions { display: flex; flex-direction: column; gap: .45rem; }

.login-card {
  width: min(520px, 100%);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem;
}

.empty { color: #59698f; }
.empty-state {
  width: min(540px, 100%);
  margin: 0 auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .95rem;
  padding: 1.2rem;
}

.site-footer {
  margin-top: 2rem;
  background: linear-gradient(160deg, #08153f, #0f2767);
  color: #e8efff;
  border-top: 2px solid var(--uhg-gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
}
.footer-grid h4 { margin: 0 0 .5rem; color: var(--uhg-gold); }
.footer-grid p { margin: .25rem 0; line-height: 1.55; }
.footer-grid a { color: #e8efff; }
.footer-legal {
  padding: .8rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
}

.developer-credit a {
  color: #ffffff;
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero-grid, .detail-wrap { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-grid { grid-template-columns: 1fr; }
  .filter-box, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .brand img { height: 58px; max-width: 190px; }
  .top-header, .quick-contact { align-items: flex-start; text-align: left; }
  .top-header { flex-direction: column; }
  .nav-inner { flex-wrap: wrap; }
  .hero-search { grid-template-columns: 1fr; }
  .hero-search button { width: 100%; min-height: 44px; }
  .logout-form { margin-left: 0; }
  .category-grid { grid-template-columns: 1fr; }
  .filter-box, .form-grid, .meta-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
