body.pl-fullwidth-body {
  margin: 0 !important;
  padding: 0 !important;
  background: #f7f9fc !important;
}

.pl-portal {
  --pl-bg: #f7f9fc;
  --pl-surface: #fff;
  --pl-surface-2: #fafaff;
  --pl-text: #1e245d;
  --pl-muted: #7782a1;
  --pl-line: #e7eaf1;
  --pl-primary: #4120a6;
  --pl-primary-2: #4120a6;
  --pl-accent: #05a936;
  --pl-accent-soft: #e8f7ed;
  --pl-red: #f62d43;
  --pl-red-soft: #fff0f2;
  --pl-gray: #7a7a7a;
  --pl-purple-soft: #f2efff;
  --pl-shadow: 0 12px 32px rgba(25, 24, 91, .07);
  --pl-radius: 18px;
  --pl-header-text: #24166f;
  --pl-header-background: #fff;
  --pl-max-width: 1180px;
  --pl-metric-columns: 3;
  --pl-logo-width: 48px;
  --pl-header-top: 24px;
  --pl-header-bottom: 22px;
  width: min(100%, 1180px);
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 18px 14px 30px !important;
  position: relative;
  z-index: 1;
  background: transparent;
  color: var(--pl-text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 60vh;
}

.pl-portal *,
.pl-portal *::before,
.pl-portal *::after { box-sizing: border-box; }
.pl-portal button,
.pl-portal input,
.pl-portal select { font: inherit; }
.pl-portal a { color: inherit; }
.pl-portal :focus-visible { outline: 3px solid rgba(65, 32, 166, .32); outline-offset: 2px; }

.pl-topbar {
  position: relative;
  width: 100%;
  margin: 0 0 16px;
  padding: var(--pl-header-top) 26px var(--pl-header-bottom);
  overflow: hidden;
  border: 1px solid var(--pl-line);
  border-radius: 20px;
  background: var(--pl-header-background);
  color: var(--pl-header-text);
  box-shadow: var(--pl-shadow);
}

.pl-topbar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg,
    #4120a6 0 25%,
    #f62d43 25% 50%,
    #7a7a7a 50% 75%,
    #05a936 75% 100%);
}

.pl-topbar-inner { max-width: 100%; margin: 0 auto; }
.pl-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; }
.pl-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #e4ddff;
  border-radius: 12px;
  background: var(--pl-purple-soft);
  color: var(--pl-primary);
}
.pl-brand-mark svg { width: 25px; height: 25px; }
.pl-brand-logo { display: block; width: var(--pl-logo-width); max-height: 66px; height: auto; flex: none; object-fit: contain; }
.pl-brand-copy { min-width: 0; }
.pl-brand-kicker {
  color: var(--pl-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}
.pl-brand-title { color: #586078; font-size: 13px; font-weight: 650; }
.pl-hero { display: block; }
.pl-hero h1 {
  margin: 0;
  color: var(--pl-primary) !important;
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.04;
}
.pl-hero p { max-width: 760px; margin: 0; color: var(--pl-muted); font-size: 15px; line-height: 1.55; }
.pl-hero-link {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--pl-accent) !important;
  border-radius: 999px;
  background: var(--pl-accent) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none !important;
  transition: filter .16s ease, transform .16s ease;
}
.pl-hero-link:hover { color: #fff !important; filter: brightness(.95); transform: translateY(-1px); }

.pl-page { width: 100%; margin: 0 auto; padding: 0; }
.pl-metrics { display: grid; grid-template-columns: repeat(var(--pl-metric-columns), minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; }
.pl-metric {
  position: relative;
  min-height: 112px;
  padding: 18px 18px 16px 22px;
  overflow: hidden;
  border: 1px solid var(--pl-line);
  border-radius: var(--pl-radius);
  background: var(--pl-surface);
  box-shadow: 0 7px 20px rgba(25, 24, 91, .045);
}
.pl-metric::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: var(--pl-primary); }
.pl-metric:nth-child(2)::before { background: var(--pl-accent); }
.pl-metric:nth-child(3)::before { background: var(--pl-gray); }
.pl-metric-label { color: var(--pl-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pl-metric-value { margin-top: 6px; color: var(--pl-primary); font-size: 28px; font-weight: 850; letter-spacing: -.04em; line-height: 1.05; }
.pl-metric-sub { margin-top: 4px; color: var(--pl-muted); font-size: 12px; }

.pl-panel {
  overflow: hidden;
  border: 1px solid var(--pl-line);
  border-radius: var(--pl-radius);
  background: var(--pl-surface);
  box-shadow: 0 8px 24px rgba(25, 24, 91, .045);
}
.pl-filters {
  display: grid;
  grid-template-columns: minmax(260px, 2.1fr) repeat(3, minmax(135px, 1fr)) auto;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--pl-line);
  background: #fff;
}
.pl-control {
  width: 100%;
  min-height: 46px !important;
  height: 46px;
  padding: 0 13px !important;
  border: 1px solid #dfe2ed !important;
  border-radius: 10px !important;
  outline: none !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--pl-text) !important;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.pl-control:focus { border-color: var(--pl-primary) !important; box-shadow: 0 0 0 3px rgba(65, 32, 166, .11) !important; }
.pl-control::placeholder { color: #8991aa; opacity: 1; }
.pl-search-wrap { position: relative; min-width: 0; }
.pl-search-wrap svg { position: absolute; z-index: 2; top: 14px; left: 14px; width: 18px; height: 18px; color: var(--pl-primary); pointer-events: none; }
.pl-search-wrap input { padding-left: 42px !important; }
.pl-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px !important;
  border: 1px solid #ded9f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--pl-primary) !important;
  font-size: 12px;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.pl-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(65, 32, 166, .1) !important; }
.pl-btn[data-action="clear"] { min-width: 128px; border-color: var(--pl-accent) !important; border-radius: 999px !important; background: var(--pl-accent) !important; color: #fff !important; }
.pl-btn[data-action="clear"]:hover { filter: brightness(.95); }

.pl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pl-line);
  background: #fbfaff;
}
.pl-result-count { color: var(--pl-muted); font-size: 12px; font-weight: 600; }
.pl-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.pl-toolbar-actions .pl-control { min-height: 38px !important; height: 38px; width: auto; }
.pl-btn[data-action="csv"] { min-height: 38px; border-color: #d9d2f4 !important; background: var(--pl-purple-soft) !important; color: var(--pl-primary) !important; }

.pl-table-wrap { overflow-x: auto; }
.pl-table {
  width: 100% !important;
  min-width: 900px !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  background: var(--pl-surface) !important;
}
.pl-table thead th {
  padding: 13px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pl-line) !important;
  background: #f5f2ff !important;
  color: var(--pl-primary) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-align: left !important;
  text-transform: uppercase;
  white-space: nowrap;
}
.pl-table tbody tr { background: #fff !important; cursor: pointer; transition: background .14s ease; }
.pl-table tbody tr:nth-child(even) { background: #fdfcff !important; }
.pl-table tbody tr:hover { background: #f6f3ff !important; }
.pl-table tbody td {
  padding: 14px !important;
  border: 0 !important;
  border-bottom: 1px solid #eff0f5 !important;
  background: transparent !important;
  color: var(--pl-text) !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}
.pl-title-cell { min-width: 330px; }
.pl-item-title { margin: 0 0 4px; color: var(--pl-primary); font-size: 13px; font-weight: 800; line-height: 1.4; }
.pl-item-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; color: var(--pl-muted); font-size: 11px; }
.pl-tag { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.pl-tag.pl-done { background: var(--pl-accent-soft); color: #087e2d; }
.pl-tag.pl-progress { background: var(--pl-purple-soft); color: var(--pl-primary); }
.pl-tag.pl-revoked { background: var(--pl-red-soft); color: #c21e35; }
.pl-tag.pl-other { background: #f0f1f5; color: #646b7a; }
.pl-docs-count { color: var(--pl-primary); font-weight: 800; }
.pl-empty { padding: 48px 20px; color: var(--pl-muted); font-size: 13px; text-align: center; }
.pl-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--pl-line); }
.pl-pages { display: flex; align-items: center; gap: 6px; }
.pl-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 !important;
  border: 1px solid #e1deef !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--pl-primary) !important;
  font-size: 12px;
  font-weight: 750 !important;
  line-height: 1 !important;
  cursor: pointer;
}
.pl-page-btn.pl-active { border-color: var(--pl-primary) !important; background: var(--pl-primary) !important; color: #fff !important; }
.pl-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pl-mobile-list { display: none; }

.pl-card {
  position: relative;
  padding: 17px 18px 17px 21px;
  border-bottom: 1px solid var(--pl-line);
  background: #fff;
  cursor: pointer;
}
.pl-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--pl-primary); opacity: .85; }
.pl-card:nth-child(4n+2)::before { background: var(--pl-red); }
.pl-card:nth-child(4n+3)::before { background: var(--pl-gray); }
.pl-card:nth-child(4n+4)::before { background: var(--pl-accent); }
.pl-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pl-card h3 { margin: 0 0 10px; color: var(--pl-primary); font-size: 14px; font-weight: 800; line-height: 1.4; }
.pl-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin-top: 10px; }
.pl-card-info span { display: block; margin-bottom: 2px; color: var(--pl-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pl-card-info strong { color: var(--pl-text); font-size: 12px; font-weight: 700; }

.pl-modal-backdrop { position: fixed; z-index: 999999; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(19, 18, 61, .58); }
.pl-modal-backdrop.pl-open { display: flex; }
.pl-modal { position: relative; width: min(980px, 100%); max-height: min(880px, 94vh); overflow: auto; border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; background: var(--pl-surface); box-shadow: 0 25px 80px rgba(19, 18, 61, .28); }
.pl-modal::before { position: sticky; z-index: 3; top: 0; display: block; height: 4px; content: ""; background: linear-gradient(90deg,#4120a6 0 25%,#f62d43 25% 50%,#7a7a7a 50% 75%,#05a936 75% 100%); }
.pl-modal-head { position: sticky; z-index: 2; top: 4px; display: flex; justify-content: space-between; gap: 16px; padding: 17px 22px 15px; border-bottom: 1px solid var(--pl-line); background: var(--pl-surface); }
.pl-modal-title { margin: 0 !important; color: var(--pl-primary) !important; font-size: 20px !important; font-weight: 800 !important; letter-spacing: -.02em; line-height: 1.28 !important; }
.pl-icon-btn { display: grid; width: 38px; height: 38px; flex: none; place-items: center; padding: 0 !important; border: 1px solid var(--pl-line) !important; border-radius: 10px !important; background: #fff !important; box-shadow: none !important; color: var(--pl-primary) !important; cursor: pointer; }
.pl-modal-body { padding: 22px; }
.pl-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 19px; }
.pl-detail-box { padding: 12px; border: 1px solid var(--pl-line); border-radius: 11px; background: #fafaff; }
.pl-detail-box span { display: block; margin-bottom: 4px; color: var(--pl-muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pl-detail-box strong { color: var(--pl-text); font-size: 12px; }
.pl-section-title { margin: 20px 0 8px; color: var(--pl-primary); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.pl-object { padding: 14px; border: 1px solid var(--pl-line); border-radius: 11px; background: #fff; color: var(--pl-text); font-size: 13px; line-height: 1.6; white-space: pre-line; }
.pl-docs { display: grid; gap: 8px; }
.pl-doc { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 13px; border: 1px solid var(--pl-line); border-radius: 11px; background: #fbfaff; }
.pl-doc-name { color: var(--pl-text); font-size: 12px; font-weight: 750; line-height: 1.4; }
.pl-doc-date { margin-top: 3px; color: var(--pl-muted); font-size: 10px; }
.pl-doc-link { padding: 9px 12px; border-radius: 999px; background: var(--pl-accent) !important; color: #fff !important; font-size: 11px; font-weight: 800; text-decoration: none !important; white-space: nowrap; }
.pl-doc-link:hover { color: #fff !important; filter: brightness(.95); }
.pl-source-link { display: inline-flex; align-items: center; margin-top: 15px; color: var(--pl-primary) !important; font-size: 12px; font-weight: 800; text-decoration: none !important; }
.pl-footer-note { margin: 14px 0 0; padding: 0 8px 12px; color: var(--pl-muted); font-size: 11px; text-align: center; }

@media (max-width: 1100px) {
  .pl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-search-wrap { grid-column: 1 / -1; }
  .pl-hero { align-items: flex-start; }
}

@media (max-width: 720px) {
  .pl-portal { width: 100%; padding: 8px 8px 28px !important; }
  .pl-topbar { width: 100%; margin: 0 0 12px; padding: 18px 16px; border-radius: 16px; }
  .pl-brand { margin-bottom: 13px; }
  .pl-brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .pl-brand-kicker { font-size: 9px; letter-spacing: .11em; }
  .pl-brand-title { font-size: 11px; }
  .pl-hero h1 { font-size: clamp(27px, 8vw, 36px); }
  .pl-hero p { font-size: 13px; }
  .pl-hero-link { min-height: 40px; }
  .pl-page { padding: 0 12px; }
  .pl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pl-metric { min-height: 95px; padding: 14px 12px 12px 16px; border-radius: 13px; }
  .pl-metric-label { font-size: 9px; }
  .pl-metric-value { font-size: 23px; }
  .pl-metric-sub { font-size: 10px; }
  .pl-panel { border-radius: 15px; }
  .pl-filters { grid-template-columns: 1fr; gap: 8px; padding: 11px; }
  .pl-search-wrap { grid-column: auto; }
  .pl-control { min-height: 43px !important; height: 43px; font-size: 12px; }
  .pl-search-wrap svg { top: 12px; }
  .pl-btn[data-action="clear"] { width: 100%; }
  .pl-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; padding: 11px; }
  .pl-toolbar-actions { width: 100%; }
  .pl-toolbar-actions .pl-control { flex: 1; min-width: 0; }
  .pl-toolbar-actions .pl-btn { flex: 0 0 auto; }
  .pl-table-wrap { display: none; }
  .pl-mobile-list { display: block; }
  .pl-card { padding: 15px 13px 15px 17px; }
  .pl-card h3 { font-size: 13px; }
  .pl-card-grid { gap: 8px; }
  .pl-card-info strong { font-size: 11px; }
  .pl-pagination { align-items: center; flex-direction: column; padding: 12px; }
  .pl-modal-backdrop { padding: 8px; }
  .pl-modal { max-height: 96vh; border-radius: 16px; }
  .pl-modal-head { padding: 14px; }
  .pl-modal-title { font-size: 17px !important; }
  .pl-modal-body { padding: 14px; }
  .pl-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pl-doc { align-items: flex-start; flex-direction: column; gap: 10px; }
  .pl-doc-link { width: 100%; text-align: center; }
}

@media (max-width: 420px) {
  .pl-metrics { grid-template-columns: 1fr; }
  .pl-metric { min-height: 82px; }
  .pl-card-top { flex-direction: column; gap: 3px; }
  .pl-card-grid { grid-template-columns: 1fr 1fr; }
  .pl-detail-grid { grid-template-columns: 1fr; }
  .pl-toolbar-actions { align-items: stretch; flex-direction: column; }
  .pl-toolbar-actions .pl-control,
  .pl-toolbar-actions .pl-btn { width: 100%; }
}
