:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #283a34;
  background: #fff;
  font-synthesis: none;
  --green: #285b4d;
  --green-dark: #1b4438;
  --soft: #eef5f1;
  --line: #e5ebe7;
  --muted: #77827c;
  --shadow: 0 12px 40px #203b3010;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8ab7a5;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #76a58f;
  outline-offset: 1px;
}
input,
textarea,
select {
  border: 1px solid #dbe3dd;
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
  color: #283a34;
  max-width: 100%;
}
input,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 17px;
}
label input,
label textarea,
label select {
  display: block;
  margin-top: 7px;
}
label select {
  width: 100%;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-weight: 600;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
}
small {
  font-size: 13px;
}
.icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #edf3ef;
}
.primary,
.secondary,
.danger,
.new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: var(--green-dark);
}
.secondary {
  border: 1px solid #dce5df;
  background: #fff;
}
.secondary:hover {
  background: #f5f8f6;
}
.danger {
  color: #a43535;
  background: #fff1ef;
}
.wide {
  width: 100%;
}
.muted {
  color: var(--muted);
  font-weight: 400;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: white;
  padding: 15px;
}
.skip-link:focus {
  top: 10px;
}
.initial {
  padding: 50px;
}
.overline,
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 650;
  color: #6c8175;
}
.topbar {
  height: 83px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 32px 0 27px;
  gap: 30px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 229px;
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand > .icon,
.login-brand > .icon {
  width: 32px;
  height: 32px;
  color: var(--green);
}
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 650px;
  width: 100%;
  border-radius: 10px;
  background: #f3f6f4;
  padding: 3px 13px;
  color: #6d7d73;
}
.search input {
  background: none;
  border: 0;
  padding: 12px 0;
  font-size: 14px;
  outline-offset: 3px;
}
.search button {
  height: 30px;
  width: 30px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  text-align: left;
  cursor: pointer;
  list-style: none;
}
.account::-webkit-details-marker {
  display: none;
}
.account:focus-visible {
  outline: 3px solid #8ab7a5;
  outline-offset: 3px;
  border-radius: 6px;
}
.account-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.account-chevron {
  width: 16px;
  transform: rotate(90deg);
}
.account-menu[open] .account-chevron {
  transform: rotate(-90deg);
}
.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px #203b3026;
}
.account-dropdown button,
.account-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  text-align: left;
  border-radius: 6px;
  font-size: 14px;
}
.account-dropdown button:hover,
.account-dropdown button:focus-visible,
.account-dropdown a:hover,
.account-dropdown a:focus-visible {
  background: var(--soft);
}
.account-dropdown a { color: inherit; text-decoration: none; }
.avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8efdf;
  color: #536b3c;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.account-name {
  font-size: 14px;
  white-space: nowrap;
}
.account-name small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.body-layout {
  display: flex;
  min-height: calc(100vh - 83px);
}
.sidebar {
  width: 256px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 25px 15px 20px;
  position: sticky;
  top: 83px;
  height: calc(100vh - 83px);
  overflow: auto;
  background: #fff;
}
.sidebar-top {
  padding: 0 9px 24px;
}
.new-button {
  background: var(--green);
  color: #fff;
  padding: 14px 17px;
  box-shadow: 0 3px 7px #183b2515;
  width: 100%;
  justify-content: flex-start;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 15px;
  font-size: 14px;
  border-radius: 7px;
  width: 100%;
  text-align: left;
  min-height: 43px;
}
.nav-item:hover,
.tree-row:hover {
  background: #f4f7f5;
}
.nav-item.active {
  background: #eaf2ed;
  color: var(--green);
  font-weight: 600;
}
.nav-item .icon {
  width: 19px;
  height: 19px;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: #98a29a;
  margin: 27px 15px 10px;
}
.tree-row {
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding-left: calc(4px + var(--depth) * 12px);
}
.tree-row.selected {
  background: #eef5f0;
  color: var(--green);
}
.tree-toggle {
  width: 22px;
  height: 36px;
  padding: 3px;
  flex-shrink: 0;
}
.tree-toggle .icon {
  width: 12px;
  height: 12px;
  transition: transform 0.15s;
}
.tree-toggle.open .icon {
  transform: rotate(90deg);
}
.tree-row a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  padding: 9px 4px;
  font-size: 13px;
}
.tree-row a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-row a .icon {
  width: 17px;
  height: 17px;
  color: #84958a;
}
.subtle {
  color: #718278;
  margin-top: 5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 35px 10px 0;
  color: #8a958d;
  font-size: 12px;
}
.sidebar-bottom .nav-item {
  padding-left: 0;
  margin-top: 14px;
  font-size: 13px;
}
.sidebar-bottom small {
  display: block;
  margin-top: 14px;
  font-size: 10px;
}
.main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 30px 40px 20px;
  max-width: 1700px;
  margin: 0 auto;
}
.banner {
  border-radius: 13px;
  background: #edf0e6 url("/banner.png") center 53% / cover no-repeat;
  min-height: 185px;
  display: flex;
  align-items: center;
  padding: 28px 37px;
  margin-bottom: 32px;
  overflow: hidden;
}
.banner > div {
  position: relative;
}
.banner h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -1.3px;
  color: #294d3c;
  margin: 0 0 9px;
}
.banner .eyebrow {
  font-size: 9px;
  color: #70806b;
  margin-bottom: 13px;
  letter-spacing: 1.8px;
}
.banner p:last-child {
  font-size: 14px;
  color: #62715d;
  margin: 0;
}
.content-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 27px;
}
.folder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.content-heading h2 {
  font-size: 25px;
  margin: 0;
}
.content-heading .overline {
  font-size: 9px;
  letter-spacing: 1.8px;
  margin-bottom: 9px;
  color: #8a978e;
}
.section-label {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label span {
  font-size: 11px;
  background: #f0f4f1;
  color: #8b968d;
  border-radius: 5px;
  padding: 2px 6px;
  font-weight: 400;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 15px 0 32px;
}
.folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  transition:
    border-color 0.15s,
    background 0.15s;
  min-height: 67px;
}
.folder-card:hover {
  border-color: #adc4b6;
  background: #f8fbf8;
}
.folder-card > .icon:first-child {
  color: #8d9f8f;
  fill: #eef3ea;
  width: 24px;
  height: 24px;
}
.folder-card > .icon:last-child {
  margin-left: auto;
  width: 12px;
  height: 12px;
  color: #b0b9b1;
}
.folder-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 9px;
}
.filters select {
  font-size: 12px;
  padding: 7px 8px;
  border-color: #e3e9e3;
  background: #fff;
}
.view-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.view-switch button {
  padding: 6px 8px;
  color: #8b978e;
}
.view-switch .icon {
  width: 16px;
  height: 16px;
}
.view-switch button[aria-pressed="true"] {
  color: var(--green);
  background: #ecf3ee;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.documents-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
.documents-table th {
  font-size: 11px;
  font-weight: 500;
  color: #8b968e;
  background: #fafcf9;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.documents-table td {
  padding: 16px;
  font-size: 12px;
  color: #7d897f;
  border-bottom: 1px solid #eef1ec;
}
.documents-table tr:last-child td {
  border-bottom: 0;
}
.documents-table tbody tr:hover {
  background: #fafcf9;
}
.documents-table th:first-child {
  width: 48%;
}
.document-cell {
  display: flex;
  align-items: center;
  gap: 13px;
}
.file-open {
  padding: 0;
}
.file-symbol {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 46px;
  color: #c06a61;
  background: #fbefeb;
  border-radius: 5px;
}
.file-symbol .icon {
  width: 23px;
  height: 27px;
}
.file-symbol small {
  position: absolute;
  font-size: 7px;
  bottom: 7px;
  background: inherit;
  line-height: 9px;
  letter-spacing: 0.4px;
}
.file-symbol.image {
  background: #edf3e5;
  color: #7b9654;
}
.file-symbol.word {
  background: #eaf1fb;
  color: #638bbc;
}
.file-symbol.ppt {
  background: #fcf0e6;
  color: #b27c4c;
}
.document-title {
  display: block;
  text-align: left;
  padding: 0;
  color: #34483c;
  font-weight: 550;
  font-size: 14px;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-title:hover {
  color: #1d674b;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.tag {
  font-size: 10px;
  color: #85917e;
  border: 1px solid #e5ecdf;
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.25;
  white-space: nowrap;
}
.tag:hover {
  background: #edf3e6;
}
.tiny-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  font-size: 9px;
  color: #85907a;
  background: #eef1e8;
  margin-right: 7px;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.row-actions .icon {
  width: 17px;
  height: 17px;
}
.row-actions .icon-button {
  width: 29px;
  height: 30px;
  color: #8b978d;
}
.library-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #a1aba1;
  font-size: 11px;
  margin: 33px 0 0;
}
.library-footer .icon {
  width: 14px;
  height: 14px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  color: #89988d;
  font-size: 12px;
}
.breadcrumbs .icon {
  width: 12px;
  height: 12px;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.results-note,
.notice {
  font-size: 14px;
  color: #6f8175;
  line-height: 1.65;
}
.results-note a {
  text-decoration: underline;
  margin-left: 15px;
}
.notice {
  padding: 14px 17px;
  background: #f2f6ef;
  border-radius: 8px;
}
.empty {
  text-align: center;
  border: 1px dashed #dbe5dc;
  border-radius: 12px;
  padding: 50px 20px;
}
.empty > .icon {
  width: 45px;
  height: 45px;
  color: #a4b5a4;
  margin-bottom: 18px;
}
.empty h3 {
  margin-bottom: 8px;
}
.empty p {
  font-size: 14px;
  color: #8c988e;
}
.empty .primary {
  margin-top: 15px;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.document-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.card-preview {
  width: 100%;
  height: 150px;
  background: #f5f8f4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-preview .file-symbol {
  transform: scale(1.6);
}
.card-body {
  padding: 17px;
}
.card-body p {
  font-size: 11px;
  color: #8b958c;
  margin: 10px 0;
}
.card-body .document-title {
  max-width: 100%;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: #8b968c;
}
.card-bottom small {
  font-size: 11px;
}
.login-page {
  min-height: 100vh;
  background: #f8faf7;
  padding: 35px 5vw;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
}
.login-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1040px;
  margin: 55px auto 25px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid #edf0e9;
}
.login-picture {
  background: #edf0e6 url("/banner.png") 68% center/auto 100%;
  min-height: 580px;
  display: flex;
  align-items: flex-end;
}
.login-picture .banner {
  background: linear-gradient(0deg, #f4f5eced, transparent);
  border-radius: 0;
  width: 100%;
  margin: 0;
  padding: 40px 30px;
  min-height: 230px;
}
.login-content {
  padding: 48px;
}
.login-content h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 35px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 17px 0;
}
.login-content > p {
  font-size: 14px;
  line-height: 1.7;
  color: #8a9389;
}
.login-content form {
  margin-top: 27px;
}
.login-content .primary {
  justify-content: space-between;
}
.local-note {
  font-size: 11px !important;
  margin-top: 23px !important;
  margin-bottom: 0;
}
.login-footer {
  text-align: center;
  font-size: 12px;
  color: #97a08f;
}
.login-footer a { color: inherit; }
.test-accounts {
  margin-top: 18px;
  font-size: 12px;
  color: #7b8c7c;
}
.test-accounts summary {
  cursor: pointer;
}
.test-accounts button {
  display: inline-block;
  font-size: 11px;
  border: 1px solid #dce7dc;
  padding: 7px;
  margin: 10px 4px 0 0;
  border-radius: 5px;
}
.form-error {
  font-size: 13px;
  line-height: 1.5;
  color: #aa4545;
  margin: 10px 0;
}
.form-error:empty {
  display: none;
}
dialog {
  border: 1px solid #dce5dc;
  border-radius: 15px;
  padding: 0;
  width: min(590px, calc(100vw - 30px));
  max-height: 90vh;
  color: #2a4032;
  box-shadow: 0 25px 100px #17341c33;
}
dialog::backdrop {
  background: #1b30265c;
  backdrop-filter: blur(3px);
}
html:has(dialog[open]) {
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.modal-header h2 {
  font-size: 20px;
  margin: 0;
  overflow-wrap: anywhere;
}
.modal-body {
  padding: 24px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}
.dropzone {
  border: 1px dashed #a7bcaa;
  border-radius: 9px;
  padding: 25px 20px;
  background: #f7faf5;
  text-align: center;
  margin-bottom: 20px;
}
.file-drag-over {
  outline: 3px dashed var(--green);
  outline-offset: -3px;
  background-color: var(--soft);
}
#main.file-drag-over::before {
  content: "Larga o ficheiro para o carregar nesta pasta";
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--soft);
  padding: 18px;
  color: var(--green);
  font-weight: 600;
  text-align: center;
}
.dropzone input {
  margin-top: 15px;
  font-size: 13px;
}
.dropzone p {
  font-size: 12px;
  color: #83907e;
  margin: 12px 0 0;
}
.details-file {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.details-file .file-symbol {
  width: 48px;
  height: 60px;
}
.details-file p {
  font-size: 13px;
  color: #809078;
  margin: 7px 0;
}
.details-description {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.details-preview {
  display: flex;
  width: 100%;
  cursor: zoom-in;
  align-items: center;
  justify-content: center;
  height: 264px;
  padding: 12px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf0eb;
  overflow: hidden;
}
.details-preview:focus-visible {
  outline: 2px solid #3d684a;
  outline-offset: 3px;
}
.details-preview img,
.details-preview canvas {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.detail-stats {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  color: #889780;
  font-size: 12px;
}
.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.versions-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.version-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.preview-modal {
  width: min(1100px, 95vw);
  height: 90vh;
  overflow: hidden;
}
.preview-modal[open] {
  display: flex;
  flex-direction: column;
}
.preview-modal .modal-header {
  flex: none;
}
.preview-modal .modal-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #edf0eb;
}
.preview-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.preview-modal img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-table th {
  font-size: 11px;
  color: #8a9888;
  font-weight: 500;
}
.admin-table small {
  display: block;
  font-size: 11px;
  color: #8b9787;
  margin-top: 5px;
}
.admin-table select {
  font-size: 12px;
  padding: 6px;
}
.admin-table .secondary {
  padding: 7px 10px;
  font-size: 12px;
}
.request-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 15px 0;
}
.request-card p {
  font-size: 13px;
  color: #7e8e79;
}
.request-card .details-actions {
  margin-top: 15px;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin: 25px 0;
}
.stat-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-card p {
  font-size: 12px;
  color: #84927d;
  margin-bottom: 10px;
}
.stat-card strong {
  font-size: 30px;
  font-weight: 500;
}
.admin-section {
  margin-top: 35px;
}
.admin-section h3 {
  font-size: 16px;
}
.sql-editor {
  font-family: Consolas, monospace;
  min-height: 180px;
  line-height: 1.6;
  font-size: 14px;
}
.sql-result {
  margin-top: 25px;
  max-height: 450px;
  overflow: auto;
}
.sql-result td {
  max-width: 350px;
  overflow-wrap: anywhere;
}
.busy {
  opacity: 0.65;
  pointer-events: none;
}
.loading {
  padding: 50px;
  text-align: center;
  color: #7d8e77;
  font-size: 14px;
}
.mobile-menu {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #294e39;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
  z-index: 100;
  transition: all 0.2s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #934d42;
}
@media (min-width: 1550px) {
  .main {
    padding: 35px 55px;
  }
  .banner {
    min-height: 220px;
  }
  .folder-card {
    padding: 22px;
  }
}
@media (max-width: 1200px) {
  .main {
    padding: 25px;
  }
  .brand {
    min-width: 190px;
  }
  .sidebar {
    width: 230px;
  }
  .topbar {
    gap: 22px;
  }
  .folder-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .documents-table td,
  .documents-table th {
    padding: 12px;
  }
  .documents-table th:nth-child(3),
  .documents-table td:nth-child(3) {
    display: none;
  }
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-name {
    display: none;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .topbar {
    height: auto;
    min-height: 73px;
    padding: 16px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .brand {
    min-width: 0;
    font-size: 19px;
    flex: 1;
  }
  .brand > .icon {
    width: 27px;
    height: 27px;
  }
  .account {
    margin-left: 0;
  }
  .search {
    order: 5;
    max-width: none;
    margin-top: 6px;
  }
  .search input {
    font-size: 16px;
  }
  .body-layout {
    min-height: calc(100vh - 140px);
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 255px;
    z-index: 30;
    transform: translateX(-100%);
    box-shadow: 10px 0 80px #0002;
    transition: transform 0.2s;
  }
  .sidebar.visible {
    transform: translateX(0);
  }
  .main {
    padding: 20px 16px;
    width: 100%;
  }
  .banner {
    min-height: 155px;
    padding: 24px;
    background-position: 43% center;
    margin-bottom: 27px;
  }
  .banner h1 {
    font-size: 30px;
  }
  .banner p:last-child {
    font-size: 12px;
  }
  .banner .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .content-heading {
    align-items: flex-start;
    margin-bottom: 23px;
  }
  .content-heading h2 {
    font-size: 24px;
  }
  .content-heading .secondary {
    font-size: 12px;
    padding: 9px;
  }
  .folder-grid {
    gap: 9px;
    margin-bottom: 25px;
  }
  .folder-card {
    padding: 15px 11px;
    font-size: 13px;
    gap: 8px;
  }
  .folder-card > .icon:last-child {
    display: none;
  }
  .folder-card > .icon:first-child {
    width: 21px;
  }
  .document-toolbar {
    flex-wrap: wrap;
    gap: 14px;
  }
  .filters {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .filters select {
    font-size: 12px;
    padding: 8px;
    max-width: 40%;
  }
  .documents-table th:nth-child(2),
  .documents-table td:nth-child(2),
  .documents-table th:nth-child(4),
  .documents-table td:nth-child(4) {
    display: none;
  }
  .documents-table td,
  .documents-table th {
    padding: 13px 10px;
  }
  .document-title {
    max-width: 190px;
    font-size: 14px;
  }
  .document-cell {
    gap: 9px;
  }
  .row-actions .icon-button:first-child {
    display: none;
  }
  .document-grid {
    gap: 12px;
  }
  .card-preview {
    height: 110px;
  }
  .card-body {
    padding: 12px;
  }
  .card-body .document-title {
    font-size: 13px;
  }
  .card-body p {
    line-height: 1.6;
  }
  .card-bottom small {
    font-size: 10px;
  }
  .login-page {
    padding: 22px 16px;
  }
  .login-panel {
    display: block;
    margin: 30px auto 20px;
    max-width: 480px;
  }
  .login-picture {
    min-height: 0;
    height: 165px;
    background-size: cover;
    background-position: center 60%;
    align-items: center;
  }
  .login-picture .banner {
    min-height: 165px;
    padding: 24px;
    background: linear-gradient(90deg, #f4f5ece0, transparent);
  }
  .login-content {
    padding: 28px;
  }
  .login-content h2 {
    font-size: 29px;
  }
  .login-content .overline {
    font-size: 10px;
  }
  .login-content input {
    font-size: 16px;
  }
  .modal-header {
    padding: 16px;
  }
  .modal-body {
    padding: 20px 17px;
  }
  .stat-cards {
    gap: 9px;
  }
  .stat-card {
    padding: 15px 10px;
  }
  .stat-card strong {
    font-size: 25px;
  }
  .stat-card p {
    font-size: 11px;
  }
  .admin-table {
    min-width: 550px;
  }
  .preview-modal {
    height: 90dvh;
  }
  .library-footer {
    font-size: 10px;
  }
  .modal-actions {
    gap: 8px;
  }
  .modal-actions button {
    flex: 1;
  }
  .dropzone {
    padding: 18px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.pdf-viewer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.pdf-toolbar {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.pdf-toolbar button {
  padding: 7px 13px;
}
.pdf-toolbar select {
  padding: 7px;
  font-size: 12px;
}
.pdf-paper {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 16px;
  text-align: center;
}
.pdf-paper canvas {
  display: block;
  margin: 0 auto;
  background: white;
  box-shadow: 0 3px 12px #0002;
}
.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: -7px;
  margin-bottom: 17px;
}
/* Página pública de informação de privacidade. */
.privacy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  line-height: 1.65;
}
.privacy-page h1 { margin: 24px 0; }
.privacy-page h2 { margin: 32px 0 10px; }
.privacy-page a { color: #365e88; }
