.page-legislacao {
  --law-yellow: #f7c617;
  --law-panel: #111317;
  --law-line: rgba(255, 255, 255, .11);
  background: #090a0c;
}

.page-legislacao::after {
  position: fixed;
  inset: 0;
  z-index: -4;
  opacity: .2;
  background-image:
    linear-gradient(rgba(247, 198, 23, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 198, 23, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
  content: "";
  pointer-events: none;
}

.law-shell {
  width: min(1220px, calc(100vw - 48px));
  margin-inline: auto;
}

.hidden { display: none !important; }

.law-sitebar {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--law-line);
  background: rgba(9, 10, 12, .9);
  backdrop-filter: blur(22px);
}

.law-sitebar-row {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.law-brand { width: 214px; }
.law-brand img { width: 100%; height: auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }

.login-button {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 10px;
  min-width: 168px;
  padding: 10px 14px;
  border: 1px solid rgba(247, 198, 23, .34);
  background: rgba(247, 198, 23, .045);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.login-button:hover { border-color: var(--law-yellow); background: rgba(247, 198, 23, .1); transform: translateY(-2px); }
.login-button i { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: var(--law-yellow); box-shadow: 0 0 0 5px rgba(247, 198, 23, .1), 0 0 18px rgba(247, 198, 23, .7); }
.login-button span { color: var(--law-yellow); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.login-button b { color: #9da1a9; font-size: 10px; font-weight: 600; }
.login-button.is-authenticated i { background: #65e6a5; box-shadow: 0 0 0 5px rgba(101, 230, 165, .1), 0 0 18px rgba(101, 230, 165, .6); }

.law-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--law-line);
  background:
    radial-gradient(circle at 76% 45%, rgba(247, 198, 23, .12), transparent 28rem),
    linear-gradient(110deg, #090a0c 40%, #101216);
}

.law-hero::before {
  position: absolute;
  inset: 0;
  opacity: .55;
  background: repeating-linear-gradient(120deg, transparent 0 64px, rgba(255, 255, 255, .025) 65px, transparent 66px);
  content: "";
}

.law-hero-grid {
  position: relative;
  display: grid;
  min-height: 445px;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding-block: 62px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--law-yellow);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow i { flex: 0 0 auto; }
.law-hero h1 {
  margin: 18px 0;
  color: #f7f8fa;
  font-family: var(--display);
  font-size: clamp(44px, 6.2vw, 82px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .94;
}

.law-hero h1 span { color: var(--law-yellow); }
.law-hero-copy > p:last-child { max-width: 570px; color: #a9adb4; font-size: clamp(16px, 1.5vw, 19px); }

.law-monitor {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(247, 198, 23, .26);
  background: rgba(12, 14, 17, .86);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .4), inset 0 0 60px rgba(247, 198, 23, .025);
}

.law-monitor::before,
.law-monitor::after { position: absolute; width: 22px; height: 22px; border-color: var(--law-yellow); content: ""; pointer-events: none; }
.law-monitor::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.law-monitor::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.monitor-head, .monitor-status { display: flex; align-items: center; justify-content: space-between; color: #8f949d; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.monitor-head span, .monitor-status { gap: 8px; }
.monitor-head i, .monitor-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--law-yellow); box-shadow: 0 0 10px var(--law-yellow); }
.monitor-head b { padding: 3px 7px; background: var(--law-yellow); color: #090a0c; font-size: 9px; }

.monitor-document {
  position: relative;
  height: 205px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-block: 1px solid var(--law-line);
  background:
    linear-gradient(rgba(247, 198, 23, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 198, 23, .04) 1px, transparent 1px),
    #0c0e11;
  background-size: 26px 26px;
  perspective: 800px;
}

.document-page {
  position: absolute;
  top: 24px;
  left: 50%;
  display: block;
  width: 130px;
  height: 158px;
  border: 1px solid rgba(247, 198, 23, .52);
  background: #171a1f;
  transform-origin: center bottom;
}

.page-back { opacity: .35; transform: translateX(-38%) rotate(8deg); animation: page-back 5s ease-in-out infinite; }
.page-middle { opacity: .55; transform: translateX(-62%) rotate(-6deg); animation: page-middle 5s ease-in-out infinite; }
.page-front { z-index: 2; padding: 24px 18px; transform: translateX(-50%) rotateY(-9deg); animation: page-float 5s ease-in-out infinite; }
.page-front::after { position: absolute; right: 0; top: 0; border-top: 22px solid rgba(247, 198, 23, .38); border-left: 22px solid transparent; content: ""; }
.page-front i { display: block; margin-bottom: 24px; color: var(--law-yellow); font-size: 27px; font-style: normal; font-weight: 900; letter-spacing: .15em; }
.page-front b { display: block; width: 100%; height: 3px; margin-top: 12px; background: rgba(255, 255, 255, .2); }
.page-front b:nth-of-type(2) { width: 72%; }
.page-front b:nth-of-type(3) { width: 88%; }
.page-front b:nth-of-type(4) { width: 54%; }
.document-scan { position: absolute; z-index: 4; top: 10px; right: 18%; left: 18%; height: 2px; background: var(--law-yellow); box-shadow: 0 0 15px 3px rgba(247, 198, 23, .6); animation: document-scan 3.2s ease-in-out infinite; }

.monitor-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--law-line); }
.monitor-data div { padding: 10px; background: #111317; }
.monitor-data small { display: block; color: #777c85; font-size: 8px; letter-spacing: .13em; }
.monitor-data strong { display: block; margin-top: 2px; color: #d8dadd; font-size: 9px; letter-spacing: .04em; }
.monitor-status { justify-content: flex-start; padding-top: 14px; color: #b7bac0; }

.admin-panel {
  margin-top: 52px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(247, 198, 23, .32);
  background: linear-gradient(135deg, rgba(247, 198, 23, .055), transparent 45%), #111317;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.admin-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--law-line); }
.admin-head h2, .content-head h2 { margin-top: 8px; font-family: var(--display); font-size: clamp(27px, 3vw, 40px); line-height: 1.1; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-mode, .logout-button, .cancel-edit {
  padding: 10px 14px;
  border: 1px solid var(--law-line);
  background: transparent;
  color: #b8bbc1;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-mode.active { border-color: var(--law-yellow); background: var(--law-yellow); color: #090a0c; }
.logout-button:hover, .cancel-edit:hover { border-color: #e46d6d; color: #ff9b9b; }
.admin-guidance { margin-top: 22px; padding: 13px 16px; border-left: 3px solid var(--law-yellow); background: rgba(247, 198, 23, .07); color: #c9cbd0; font-size: 13px; }

.publication-form { display: grid; grid-template-columns: .32fr .68fr; gap: 22px; margin-top: 28px; }
.form-field { display: grid; gap: 8px; }
.form-body { min-width: 0; grid-column: 1 / -1; }
.form-field label, .login-form label { color: #aeb1b7; font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.form-field label span { color: #696e77; font-size: 9px; }
.form-field input, .subject-filter select, .custom-period input, .login-form input {
  width: 100%;
  border: 1px solid var(--law-line);
  border-radius: 0;
  background: #090a0c;
  color: #f7f8fa;
  outline: none;
}
.form-field input, .subject-filter select, .custom-period input, .login-form input { min-height: 46px; padding: 0 13px; }
.form-field input:focus, .subject-filter select:focus, .custom-period input:focus, .login-form input:focus { border-color: var(--law-yellow); box-shadow: 0 0 0 3px rgba(247, 198, 23, .08); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1px;
  padding: 8px;
  border: 1px solid var(--law-line);
  border-bottom: 0;
  background: #171a1f;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-right: 1px solid var(--law-line);
}

.toolbar-group:last-child { border-right: 0; }
.format-button, .toolbar-text-button, .color-swatch {
  min-width: 34px;
  height: 34px;
  border: 1px solid transparent;
  background: #0d0f12;
  color: #d8dbe0;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.format-button:hover, .format-button.active, .toolbar-text-button:hover {
  border-color: rgba(247, 198, 23, .55);
  background: rgba(247, 198, 23, .08);
  color: var(--law-yellow);
}
.format-button b, .format-button i, .format-button u { font-size: 14px; }
.toolbar-text-button { width: auto; padding: 0 10px; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.toolbar-selects { gap: 8px; }
.toolbar-selects label { display: flex; align-items: center; gap: 6px; }
.toolbar-selects label > span { color: #747983; font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.toolbar-selects select {
  width: auto;
  max-width: 145px;
  height: 34px;
  padding: 0 24px 0 8px;
  border: 1px solid transparent;
  background: #0d0f12;
  color: #d8dbe0;
  cursor: pointer;
  font-size: 10px;
}
.toolbar-selects select:focus { border-color: var(--law-yellow); outline: none; }
.toolbar-divider { width: 1px; height: 22px; margin-inline: 3px; background: var(--law-line); }
.color-swatch {
  position: relative;
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-block: 5px;
  padding: 0;
}
.color-swatch::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 2px;
  background: var(--swatch);
  content: "";
}
.color-swatch:hover, .color-swatch.active { border-color: var(--law-yellow); background: rgba(247, 198, 23, .08); }

.rich-editor {
  display: block;
  width: 100%;
  height: 360px;
  min-height: 330px;
  max-height: 620px;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  resize: vertical;
  border: 1px solid var(--law-line);
  background: #090a0c;
  color: #f7f8fa;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  outline: none;
}
.rich-editor:focus { border-color: var(--law-yellow); box-shadow: 0 0 0 3px rgba(247, 198, 23, .08); }
.rich-editor:empty::before {
  color: #666b74;
  content: attr(data-placeholder);
  pointer-events: none;
}
.rich-editor p { margin: 0 0 .85em; }
.rich-editor h1, .rich-editor h2, .rich-editor h3, .rich-editor h4 { margin: .6em 0 .35em; line-height: 1.2; }
.rich-editor ul, .rich-editor ol { padding-left: 24px; }
.rich-editor a { color: var(--law-yellow); text-decoration: underline; }
.rich-editor *,
.publication-body * {
  background-color: transparent !important;
  background-image: none !important;
}
.editor-help { color: #777c85; font-size: 11px; }
.form-controls { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.save-publication, .submit-login {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0 20px;
  border: 0;
  background: var(--law-yellow);
  color: #08090a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.save-publication:hover, .submit-login:hover { background: #ffda3a; }
.form-message { grid-column: 1 / -1; padding: 10px 13px; color: #8ee4b6; background: rgba(65, 194, 123, .08); font-size: 13px; }
.form-message.error { color: #ffaaa7; background: rgba(229, 81, 74, .08); }

.image-manager { margin-top: 28px; }
.image-manager-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.image-manager-head span { color: var(--law-yellow); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.image-manager-head h3 { margin-top: 7px; color: #f2f3f5; font-family: var(--display); font-size: clamp(25px, 3vw, 36px); }
.image-manager-head p { max-width: 460px; color: #8c9199; font-size: 12px; line-height: 1.6; }
.image-upload-box { display: flex; min-height: 92px; align-items: center; gap: 20px; padding: 18px; border: 1px dashed rgba(247,198,23,.34); background: rgba(247,198,23,.035); }
.select-images { display: inline-flex; min-height: 46px; align-items: center; gap: 9px; padding: 0 18px; border: 1px solid var(--law-yellow); background: var(--law-yellow); color: #090a0c; cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.select-images span { font-size: 18px; font-weight: 500; }
.image-upload-box strong, .image-upload-box small { display: block; }
.image-upload-box strong { color: #cfd1d5; font-size: 10px; letter-spacing: .08em; }
.image-upload-box small { max-width: 660px; margin-top: 5px; color: #777c85; font-size: 10px; line-height: 1.5; }
.image-manager-status { min-height: 20px; margin-top: 14px; color: #8ee4b6; font-size: 11px; }
.image-manager-status.error { color: #ffaaa7; }
.image-thumbnail-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-top: 8px; }
.image-thumb { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--law-line); background: #08090b; }
.image-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.image-thumb figcaption { display: flex; min-height: 44px; align-items: center; padding: 8px 10px; color: #8f949c; font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
.image-thumb .delete-image { position: absolute; z-index: 2; top: 7px; right: 7px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.25); background: rgba(5,6,8,.78); color: #fff; cursor: pointer; }
.image-thumb .delete-image::before { width: 9px; height: 11px; border: 1px solid currentColor; border-top: 0; content: ""; }
.image-thumb .delete-image::after { position: absolute; top: 8px; width: 11px; height: 1px; background: currentColor; box-shadow: 2px -2px 0 -1px currentColor; content: ""; }
.image-thumb.pending-delete img { opacity: .22; filter: grayscale(1); }
.image-thumb.pending-delete::after { position: absolute; inset: 0 0 44px; display: grid; place-items: center; background: rgba(8,9,11,.42); color: #ffaaa7; content: "SERÁ EXCLUÍDA"; font-size: 8px; font-weight: 900; letter-spacing: .09em; }
.image-thumb.pending-delete .delete-image { border-color: rgba(142,228,182,.45); color: #8ee4b6; }
.image-thumb.is-new { border-color: rgba(247,198,23,.58); }
.image-thumb.is-new::before { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 5px 7px; background: var(--law-yellow); color: #090a0c; content: "NOVA"; font-size: 7px; font-weight: 950; letter-spacing: .08em; }
.image-manager-empty { margin-top: 16px; padding: 28px; border: 1px solid var(--law-line); background: #090a0c; color: #858a93; text-align: center; font-size: 12px; }
.image-manager-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--law-line); }
.image-manager-controls > span { color: #777c85; font-size: 11px; }
.image-manager-controls > div { display: flex; gap: 9px; }
.cancel-image-changes, .save-image-changes { min-height: 44px; padding: 0 16px; cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.cancel-image-changes { border: 1px solid var(--law-line); background: transparent; color: #b8bbc1; }
.save-image-changes { border: 1px solid var(--law-yellow); background: var(--law-yellow); color: #090a0c; }
.save-image-changes b { margin-left: 10px; }
.save-image-changes:disabled, .cancel-image-changes:disabled, .select-images:disabled { cursor: wait; opacity: .48; }

.law-content { padding-block: 74px 90px; }
.content-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.content-head > span { color: #8e9299; font-family: ui-monospace, Consolas, monospace; font-size: 12px; letter-spacing: .08em; }
.filter-panel {
  display: grid;
  grid-template-columns: 1fr 230px minmax(210px, .65fr) auto;
  align-items: end;
  gap: 18px;
  margin: 32px 0;
  padding: 18px;
  border: 1px solid var(--law-line);
  background: #101216;
}
.date-filter small, .subject-filter label, .filter-search > span { display: block; margin-bottom: 8px; color: #777c84; font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.filter-search > div { position: relative; }
.filter-search input { width: 100%; min-height: 46px; padding: 0 13px 0 42px; border: 1px solid var(--law-line); background: #090a0c; color: #f7f8fa; outline: 0; }
.filter-search input:focus { border-color: var(--law-yellow); box-shadow: 0 0 0 3px rgba(247,198,23,.08); }
.filter-search i { position: absolute; z-index: 1; top: 50%; left: 15px; width: 12px; height: 12px; border: 1px solid #92969d; border-radius: 50%; transform: translateY(-58%); }
.filter-search i::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1px; background: #92969d; content: ""; transform: rotate(45deg); }
.filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-options button, .clear-filters, .custom-period button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--law-line);
  background: #15181c;
  color: #b9bcc2;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.filter-options button:hover, .filter-options button.active { border-color: var(--law-yellow); color: var(--law-yellow); }
.clear-filters { background: transparent; }
.clear-filters:hover { color: #fff; border-color: #777; }
.custom-period { grid-column: 1 / -1; display: flex; align-items: end; gap: 12px; padding-top: 15px; border-top: 1px solid var(--law-line); }
.custom-period label { flex: 1; color: #8f939a; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.custom-period input { display: block; margin-top: 7px; }
.custom-period button { border-color: var(--law-yellow); color: var(--law-yellow); }

.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; align-items: start; gap: 32px; }
.publication-list { display: grid; gap: 18px; }
.publication-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--law-line);
  background: linear-gradient(130deg, rgba(255, 255, 255, .018), transparent 50%), #101216;
  transition: transform .25s ease, border-color .25s ease;
}
.publication-card:hover { border-color: rgba(247, 198, 23, .31); transform: translateY(-3px); }
.publication-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--law-yellow); content: ""; }
.publication-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.publication-date { color: #898e97; font-family: ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: .1em; }
.publication-subject { padding: 5px 9px; border: 1px solid rgba(247, 198, 23, .22); background: rgba(247, 198, 23, .06); color: var(--law-yellow); cursor: pointer; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.publication-card h3 { margin: 0 0 18px; color: #f4f5f7; font-family: var(--display); font-size: clamp(23px, 2.6vw, 34px); line-height: 1.1; }
.publication-body { color: #f7f8fa; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.publication-body > * + * { margin-top: 1em; }
.publication-body h1, .publication-body h2, .publication-body h3 { color: #f0f1f3; font-size: 1.35em; letter-spacing: 0; }
.publication-body a { color: var(--law-yellow); text-decoration: underline; }
.publication-body ul, .publication-body ol { padding-left: 22px; }
.publication-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.publication-body td, .publication-body th { padding: 8px 10px; border: 1px solid var(--law-line); }
.publication-admin-actions { display: flex; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--law-line); }
.publication-admin-actions button { padding: 8px 12px; border: 1px solid var(--law-line); background: transparent; color: #babdc2; cursor: pointer; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.publication-admin-actions .edit-publication:hover { border-color: var(--law-yellow); color: var(--law-yellow); }
.publication-admin-actions .delete-publication:hover { border-color: #e46d6d; color: #ff9b9b; }

.law-sidebar { position: sticky; top: 22px; display: grid; gap: 18px; }
.law-sidebar section { border: 1px solid var(--law-line); background: #101216; }
.law-sidebar header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--law-line); color: #f2f3f5; font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.law-sidebar header b { display: grid; min-width: 27px; height: 27px; place-items: center; background: var(--law-yellow); color: #090a0c; font-size: 10px; }
.law-sidebar nav { padding: 8px; }
.law-sidebar button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 15px; padding: 10px; border: 0; background: transparent; color: #aeb1b7; cursor: pointer; text-align: left; font-size: 12px; }
.law-sidebar button span { color: #686d75; font-family: ui-monospace, Consolas, monospace; }
.law-sidebar button:hover, .law-sidebar button.active { background: rgba(247, 198, 23, .07); color: var(--law-yellow); }

.law-loading, .empty-publications, .public-error { display: grid; min-height: 190px; place-content: center; justify-items: center; padding: 35px; border: 1px solid var(--law-line); background: #101216; text-align: center; }
.law-loading i { width: 42px; height: 42px; margin-bottom: 15px; border: 2px solid rgba(247, 198, 23, .18); border-top-color: var(--law-yellow); border-radius: 50%; animation: spin .8s linear infinite; }
.law-loading span, .empty-publications p { color: #8f939b; font-size: 13px; }
.empty-publications strong { color: #f2f3f5; }
.public-error { color: #ffaaa7; border-color: rgba(229, 81, 74, .24); }

.login-dialog {
  width: min(470px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid rgba(247, 198, 23, .32);
  border-radius: 0;
  background: #111317;
  color: #f7f8fa;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .72);
}
.login-dialog::backdrop { background: rgba(3, 4, 5, .82); backdrop-filter: blur(9px); }
.dialog-close-form { position: absolute; top: 12px; right: 12px; }
.dialog-close-form button { width: 36px; height: 36px; border: 1px solid var(--law-line); background: transparent; color: #aeb1b7; cursor: pointer; font-size: 23px; }
.login-form { display: grid; gap: 12px; padding: 40px; }
.login-form h2 { margin: 6px 0 0; font-family: var(--display); font-size: 30px; }
.login-form > p:not(.eyebrow):not(.login-error) { margin-bottom: 8px; color: #979ba3; font-size: 13px; }
.login-form label { margin-top: 4px; }
.login-error { padding: 9px 12px; background: rgba(229, 81, 74, .08); color: #ffaaa7; font-size: 12px; }
.submit-login { margin-top: 8px; }

.law-footer { border-top: 1px solid var(--law-line); background: #070809; }
.law-footer .law-shell { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 24px; color: #727780; font-size: 11px; }
.law-footer p { color: #90949b; }
.back-top { width: 40px; height: 40px; border: 1px solid var(--law-line); background: transparent; color: var(--law-yellow); cursor: pointer; }

@keyframes page-float {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateY(-9deg); }
  50% { transform: translateX(-50%) translateY(-8px) rotateY(8deg); }
}
@keyframes page-back {
  0%, 100% { transform: translateX(-38%) rotate(8deg); }
  50% { transform: translateX(-33%) rotate(11deg); }
}
@keyframes page-middle {
  0%, 100% { transform: translateX(-62%) rotate(-6deg); }
  50% { transform: translateX(-67%) rotate(-10deg); }
}
@keyframes document-scan {
  0%, 100% { top: 11px; opacity: .25; }
  50% { top: 190px; opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .law-hero-grid { grid-template-columns: 1fr; padding-block: 55px; }
  .law-monitor { max-width: 570px; }
  .filter-panel { grid-template-columns: 1fr 230px; }
  .filter-search { grid-column: 1 / -1; }
  .clear-filters { grid-column: 1 / -1; justify-self: start; }
  .blog-layout { grid-template-columns: 1fr; }
  .law-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .image-thumbnail-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .law-shell { width: min(100% - 28px, 1220px); }
  .law-sitebar-row { min-height: 75px; }
  .law-brand { width: 166px; }
  .login-button { min-width: 48px; padding: 10px; grid-template-columns: auto; }
  .login-button i { grid-row: auto; }
  .login-button span, .login-button b { display: none; }
  .law-hero-grid { min-height: 0; padding-block: 44px; }
  .law-hero h1 { font-size: clamp(42px, 14vw, 62px); }
  .monitor-data { grid-template-columns: 1fr; }
  .monitor-data div { display: flex; align-items: center; justify-content: space-between; }
  .admin-panel { margin-top: 28px; }
  .admin-head, .content-head { align-items: flex-start; flex-direction: column; }
  .publication-form, .filter-panel { grid-template-columns: 1fr; }
  .form-body, .form-controls, .custom-period, .clear-filters { grid-column: auto; }
  .rich-toolbar { gap: 7px 1px; }
  .toolbar-group { padding-inline: 5px; }
  .toolbar-selects { width: 100%; order: 2; border-right: 0; border-top: 1px solid var(--law-line); padding-top: 7px; }
  .toolbar-selects label { flex: 1; }
  .toolbar-selects select { width: 100%; max-width: none; }
  .rich-editor { min-height: 330px; padding: 16px; }
  .form-controls { flex-direction: column-reverse; }
  .form-controls button { width: 100%; }
  .image-manager-head, .image-manager-controls { align-items: flex-start; flex-direction: column; }
  .image-upload-box { align-items: stretch; flex-direction: column; }
  .image-thumbnail-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .image-manager-controls > div, .image-manager-controls button { width: 100%; }
  .custom-period { align-items: stretch; flex-direction: column; }
  .law-content { padding-block: 54px 70px; }
  .law-sidebar { grid-template-columns: 1fr; }
  .login-form { padding: 34px 24px 26px; }
  .law-footer .law-shell { align-items: flex-start; flex-direction: column; padding-block: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-front, .page-back, .page-middle, .document-scan, .law-loading i { animation: none; }
}
