.page-forms {
  background: #f7f9fc;
}

.forms-filterbar {
  background: #fff;
  border-bottom: 1px solid #e8edf4;
  padding: var(--cat-bar-pad-y) 0;
  position: sticky;
  top: var(--cat-bar-sticky-top);
  z-index: 15;
}

.forms-filterbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
  display: flex;
  align-items: center;
  gap: 12px;
}

.forms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.forms-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #e4eaf2;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.forms-pill:hover {
  border-color: #c9d6ea;
  color: var(--blue);
}

.forms-pill.is-on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.forms-pill__ico {
  font-size: 11px;
  opacity: 0.9;
}

/* legacy cat-bar kept inert if residual markup remains */
.cat-bar {
  display: none;
}

.forms-main {
  padding: var(--main-pad-top) 0 var(--main-pad-bottom);
}

.forms-main__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
  display: grid;
  grid-template-columns: var(--sidebar-left) minmax(0, 1fr) var(--sidebar-right);
  gap: var(--main-gap);
  align-items: start;
}

.forms-filters,
.forms-list-panel,
.side-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.forms-filters {
  padding: 16px 14px;
  display: grid;
  gap: 22px;
}

.forms-filters h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.forms-list-panel {
  padding: 14px 14px 16px;
  min-width: 0;
}

.forms-list-panel__head {
  /* shared via .list-panel-head in common.css */
}

.forms-table-wrap {
  overflow-x: auto;
}

.forms-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.forms-table th,
.forms-table td {
  padding: 11px 8px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
  color: #4b5563;
}

.forms-table th {
  background: #fafbfd;
  color: #8b93a0;
  font-size: 12px;
  font-weight: 600;
}

.col-check {
  width: 34px;
}

.col-file {
  width: 44px;
}

.col-name {
  min-width: 180px;
}

.forms-table .col-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-cat {
  width: 110px;
}

.col-type {
  width: 70px;
}

.col-date {
  width: 90px;
}

.col-down {
  width: 78px;
  text-align: right !important;
}

.col-action {
  width: 90px;
}

.col-scrap {
  width: 40px;
}

.forms-table td a {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy-deep);
}

.forms-table td a:hover {
  color: var(--blue);
}

.ftype {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.ftype--docx {
  background: #2b579a;
}

.ftype--hwp {
  background: #2f6bff;
}

.ftype--xlsx {
  background: #217346;
}

.ftype--pdf {
  background: #e11d48;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cat-pill--blue {
  background: #e8f0ff;
  color: #3b7cff;
}

.cat-pill--cyan {
  background: #e6f7f4;
  color: #1aa88e;
}

.cat-pill--gold {
  background: #fff4d8;
  color: #c98a00;
}

.cat-pill--green {
  background: #e8f6ec;
  color: #2f9e57;
}

.cat-pill--orange {
  background: #fff1e6;
  color: #f0842a;
}

.cat-pill--violet {
  background: #eee8ff;
  color: #7a5af8;
}

.cat-pill--teal {
  background: #e7f6f2;
  color: #2a9d8f;
}

.cat-pill--navy {
  background: #e8eef8;
  color: #163a73;
}

.cat-pill--slate {
  background: #eef2f6;
  color: #64748b;
}

.dl-btn {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.dl-btn:hover {
  background: var(--blue-deep);
}

.scrap-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.scrap-btn:hover,
.scrap-btn.is-on {
  background: #eaf1ff;
}

.forms-side {
  display: grid;
  gap: 12px;
  align-self: start;
}

.forms-top .side-box__head {
  margin-bottom: 4px;
}

.forms-top .top-dl {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: forms-top;
  display: grid;
  gap: 2px;
}

.forms-top .top-dl li {
  counter-increment: forms-top;
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid #f1f4f8;
  align-items: start;
}

.forms-top .top-dl li:first-child {
  border-top: 0;
  padding-top: 8px;
}

.forms-top .top-dl a {
  position: relative;
  display: block;
  padding-left: 28px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.45;
  color: var(--navy-deep);
}

.forms-top .top-dl a::before {
  content: counter(forms-top);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #eef2f8;
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.forms-top .top-dl li:nth-child(-n + 3) a::before {
  background: #e8f0ff;
  color: var(--blue);
}

.forms-top .top-dl a:hover {
  color: var(--blue);
}

.forms-top .top-dl em {
  display: block;
  padding-left: 28px;
  font-style: normal;
  font-size: 12px;
  color: #93a0ae;
}

.forms-top .top-dl .content-empty {
  border: 0;
  padding: 24px 8px;
  text-align: center;
  color: #8b93a0;
  font-size: 13px;
}

.side-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}

.side-cta:hover {
  background: var(--blue-deep);
}

.side-box {
  padding: 14px;
}

.side-box p {
  margin: 8px 0 12px;
  font-size: 13px;
  color: #5d6673;
  line-height: 1.55;
}

.side-box > a {
  font-size: 13px;
  color: var(--blue);
  font-weight: 700;
}

.side-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.side-box__head h2 {
  margin: 0;
}

.side-box__head a {
  font-size: 12px;
  color: #8b93a0;
}

.top-dl {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: top;
}

.top-dl li {
  counter-increment: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #f1f4f8;
}

.top-dl li:first-child {
  border-top: 0;
  padding-top: 0;
}

.top-dl a {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.top-dl a::before {
  content: counter(top);
  position: absolute;
  left: 0;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #eef2f8;
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.top-dl li:nth-child(-n + 3) a::before {
  background: #e8f0ff;
  color: var(--blue);
}

.top-dl em {
  font-style: normal;
  font-size: 12px;
  color: #93a0ae;
  flex-shrink: 0;
}

@media (max-width: 1199px) {
  .forms-main__inner {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .forms-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .side-cta {
    grid-column: 1 / -1;
  }

  .forms-filterbar {
    position: static;
  }
}

@media (max-width: 767px) {
  .forms-main__inner,
  .forms-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .forms-main__inner,
  .forms-filterbar__inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}
