:root {
  --navy: #102e46;
  --blue: #176caa;
  --ink: #20394d;
  --muted: #758695;
  --border: #e4eaee;
  --bg: #f5f7f9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: 'DM Sans',Arial,sans-serif;
  font-size: 14px;
}
button,input,select {
  font: inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: .5;
  cursor: wait;
}
a {
  color: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
button:focus-visible,a:focus-visible {
  outline: 3px solid #43b4ec;
  outline-offset: 3px;
}
button,input,select {
  transition: background .18s,border-color .18s,box-shadow .18s;
}
input,select {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  min-width: 0;
}
input:focus,select:focus {
  outline: 2px solid #a6cde5;
  border-color: var(--blue);
}
[hidden] {
  display: none !important;
}
svg.icon {
  width: 19px;
  height: 19px;
  display: block;
  flex-shrink: 0;
}
h1,h2,h3,p {
  margin: 0;
}
h1,h2,h3 {
  font-family: Manrope,Arial,sans-serif;
}
h2 {
  font-size: 23px;
  letter-spacing: -.6px;
}
h3 {
  font-size: 16px;
}
.sidebar {
  width: 252px;
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 18px;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--navy);
  padding: 0 10px;
  font-size: 29px;
  font-family: Manrope,sans-serif;
  font-weight: 800;
  letter-spacing: 3px;
}
.brand-symbol {
  width: 43px;
  height: 43px;
  border: 1px solid #cad6df;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-family: serif;
  letter-spacing: 0;
}
.brand small {
  display: block;
  font-family: 'DM Sans',sans-serif;
  font-size: 7px;
  letter-spacing: 1.2px;
  margin-top: 0;
}
.portal-label {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #93a0aa;
  margin: 34px 12px 16px;
}
.nav-button,.site-button {
  width: 100%;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  color: #697e8d;
  justify-content: flex-start;
  text-align: left;
  border-radius: 7px;
  font-weight: 500;
  margin: 3px 0;
}
.nav-button.active {
  background: #eaf2f8;
  color: #176598;
  font-weight: 700;
}
.nav-button:hover,.site-button:hover {
  background: #f0f5f8;
}
.nav-section {
  font-size: 10px;
  color: #93a0aa;
  letter-spacing: 1.2px;
  margin: 34px 12px 12px;
}
.site-button {
  font-size: 13px;
}
.site-button.active {
  color: #226da0;
  background: #f6f9fb;
}
.site-button.active:after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #277eaf;
  margin-left: auto;
}
.site-button .icon {
  width: 16px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.help-box {
  background: #f6f9fb;
  border: 1px solid #edf1f4;
  padding: 17px 15px;
  border-radius: 9px;
}
.help-box>.icon {
  color: #4286ae;
  margin-bottom: 12px;
}
.help-box strong {
  display: block;
  font-size: 12px;
}
.help-box p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 5px;
}
.help-box button {
  background: none;
  border: 0;
  color: #387aa3;
  font-size: 11px;
  padding: 10px 0 0;
  width: 100%;
  justify-content: space-between;
}
.profile {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  background: #eaf1f6;
  color: #3f7194;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: bold;
}
.profile strong {
  font-size: 12px;
  display: block;
}
.profile small {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.profile .icon-button {
  margin-left: auto;
}
.workspace {
  margin-left: 252px;
}
header {
  height: 78px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 13px;
  color: #b7c2ca;
}
.breadcrumb strong {
  font-weight: 500;
  color: #4b6274;
}
.header-right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.private-label {
  display: flex;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  align-items: center;
}
.private-label .icon {
  width: 13px;
}
.icon-button {
  border: 0;
  background: transparent;
  padding: 7px;
  color: #7e909d;
  border-radius: 6px;
}
.icon-button:hover {
  background: #edf4f8;
  color: #216c9f;
}
main {
  padding: 28px 40px 15px;
  max-width: 1600px;
  margin: auto;
}
.demo-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #eaf2f8;
  border: 1px solid #d6e4ef;
  border-radius: 6px;
  color: #4b6e86;
  font-size: 11px;
  margin-bottom: 18px;
}
.demo-banner label {
  white-space: nowrap;
}
.demo-banner select {
  font-size: 11px;
  margin-left: 6px;
  padding: 5px 8px;
  background: transparent;
  border-color: #cfdee9;
}
.hero {
  min-height: 260px;
  border-radius: 12px;
  background: linear-gradient(112deg,#143c59,#1a5375);
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 31px 35px;
}
.hero-copy {
  z-index: 1;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #a8ccdf;
  font-weight: 600;
}
.hero h1 {
  font-size: 33px;
  line-height: 1.24;
  letter-spacing: -1px;
  margin: 13px 0 12px;
  font-weight: 650;
}
.hero p {
  font-size: 12px;
  color: #b7d0df;
  line-height: 1.8;
}
.hero-badge {
  font-size: 10px;
  color: #d9e8ef;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 21px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #76b7a7;
  border-radius: 50%;
}
.hero-badge i {
  height: 11px;
  width: 1px;
  background: #65869c;
  margin: 0 5px;
}
.ship-art {
  width: 42%;
  height: 250px;
  position: absolute;
  right: 2%;
  bottom: 0;
  opacity: .94;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 17px;
  margin: 21px 0 32px;
}
.stat {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-icon {
  width: 42px;
  height: 42px;
  background: #f0f6fa;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #4487b4;
}
.stat:nth-child(2) .stat-icon {
  background: #ecf5f1;
  color: #68a18d;
}
.stat:nth-child(3) .stat-icon {
  background: #f3f0fa;
  color: #9484b5;
}
.stat strong {
  font-family: Manrope,sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.stat p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
  gap: 15px;
}
.kicker {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #8596a2;
  font-weight: 600;
  display: block;
  margin-bottom: 7px;
}
.primary {
  border: 0;
  background: #176fa9;
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  padding: 12px 17px;
  box-shadow: 0 3px 5px #155d8f12;
}
.primary:hover {
  background: #125886;
  box-shadow: 0 4px 9px #155d8f25;
}
.primary .icon {
  width: 16px;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.folder-card {
  background: white;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px;
  text-align: left;
  gap: 0;
  position: relative;
}
.folder-card:hover {
  border-color: #8fb8d3;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px #12324b08;
}
.folder-card.selected {
  border-color: #458fbd;
  background: #f2f8fc;
}
.folder-card .folder-icon {
  color: #548fb6;
  background: #edf5fa;
  padding: 9px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.folder-card:nth-child(2) .folder-icon {
  color: #6d9e92;
  background: #eff6f3;
}
.folder-card:nth-child(3) .folder-icon {
  color: #9a8ab1;
  background: #f4f1f8;
}
.folder-card:nth-child(4) .folder-icon {
  color: #b19c70;
  background: #f8f5ee;
}
.folder-card strong {
  font-size: 12px;
  line-height: 1.5;
}
.folder-card small {
  font-size: 10px;
  color: #8c9aa6;
  margin-top: 6px;
}
.folder-card .arrow {
  position: absolute;
  right: 14px;
  top: 19px;
  color: #9eb0bd;
}
.document-panel {
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  overflow: hidden;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 23px 17px;
  gap: 12px;
}
.panel-top h3 {
  font-size: 15px;
}
.panel-top p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
#count-badge {
  font-family: 'DM Sans',sans-serif;
  font-size: 10px;
  margin-left: 7px;
  color: #6a8aa1;
  padding: 3px 7px;
  background: #eef4f7;
  border-radius: 4px;
}
.toolbar {
  padding: 0 23px 19px;
  display: flex;
  gap: 10px;
}
.toolbar select {
  font-size: 11px;
  padding: 9px 10px;
}
.search {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fafcfd;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 11px;
}
.search .icon {
  width: 16px;
  color: #95a4af;
}
.search input {
  padding: 10px 0;
  background: none;
  border: 0;
  font-size: 11px;
  outline: none;
  width: 100%;
}
.search:focus-within {
  outline: 2px solid #a6cde5;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  text-align: left;
}
th {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .7px;
  background: #f8fafb;
  padding: 12px 14px;
  color: #8a9aa6;
  border-top: 1px solid #edf1f4;
  border-bottom: 1px solid #edf1f4;
}
th:first-child,td:first-child {
  padding-left: 23px;
}
td {
  font-size: 11px;
  color: #81909d;
  padding: 15px 14px;
  border-bottom: 1px solid #edf1f4;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  animation: arrive .25s ease;
}
tbody tr:hover {
  background: #fbfdff;
}
.doc-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-icon {
  width: 32px;
  height: 39px;
  flex-shrink: 0;
  background: #fdf1ef;
  border: 1px solid #f5e3e0;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #c27e77;
  font-size: 8px;
  font-weight: 700;
}
.file-icon.docx {
  background: #edf4fd;
  color: #6792c0;
  border-color: #e2ebf6;
}
.file-icon.xlsx {
  background: #edf7f0;
  color: #6b9c7b;
  border-color: #dfebe3;
}
.file-icon.txt {
  background: #eef4f8;
  color: #7996aa;
  border-color: #e2ebf1;
}
.doc-name {
  border: 0;
  background: none;
  color: #3b5367;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  padding: 0;
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-name:hover {
  color: var(--blue);
}
.doc-cell small {
  display: block;
  color: #97a4ae;
  font-size: 9px;
  margin-top: 5px;
}
.folder-tag {
  background: #f3f6f8;
  color: #7c8f9e;
  padding: 4px 7px;
  font-size: 10px;
  border-radius: 4px;
}
.row-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}
.row-actions .icon {
  width: 15px;
  height: 15px;
}
.actions-head {
  text-align: right;
  padding-right: 23px;
}
.favorite-on {
  color: #bb963e;
}
.table-footer {
  border-top: 1px solid var(--border);
  padding: 14px 23px;
  font-size: 10px;
  color: #93a1ab;
  display: flex;
  justify-content: space-between;
}
.table-footer .status-dot {
  width: 5px;
  height: 5px;
  margin-right: 5px;
}
footer {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  color: #a1acb6;
  font-size: 9px;
  margin: 24px 0 10px;
}
footer>span:first-child {
  font-size: 8px;
  letter-spacing: 1.2px;
}
.text-button {
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--blue);
}
.empty {
  text-align: center;
  padding: 40px;
  color: #889ba9;
}
.empty>.icon {
  margin: 0 auto 15px;
  width: 30px;
  height: 30px;
}
.empty p {
  font-size: 12px;
  margin-top: 8px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 26px;
  width: min(570px,92vw);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 90px #112f4540;
}
dialog::backdrop {
  background: #102a3f80;
  backdrop-filter: blur(3px);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-heading h2 {
  font-size: 21px;
}
#modal-body p {
  line-height: 1.7;
  color: #748796;
  font-size: 13px;
  margin-bottom: 15px;
}
#modal-body form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
label {
  font-size: 12px;
}
#modal-body label,.login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
}
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.secondary {
  background: white;
  border: 1px solid var(--border);
  color: #617b8e;
  padding: 11px 17px;
  border-radius: 7px;
}
.danger {
  background: #b54f4f;
  color: white;
  border: 0;
  border-radius: 7px;
  padding: 11px 17px;
}
.dropzone {
  background: #f5f9fc;
  border: 1px dashed #a9c5d8;
  border-radius: 9px;
  padding: 24px;
  text-align: center;
  color: #4f7e9e;
  display: flex;
  align-items: center !important;
  gap: 12px !important;
}
.dropzone .icon {
  width: 30px;
  height: 30px;
}
.dropzone input {
  max-width: 100%;
  font-size: 11px;
}
.dropzone small {
  font-size: 10px;
  color: #8598a6;
}
.toast {
  position: fixed;
  bottom: 28px;
  right: 30px;
  z-index: 10;
  width: min(390px,calc(100vw - 40px));
  background: white;
  box-shadow: 0 10px 45px #14354c30;
  border: 1px solid #c7ddd4;
  border-left: 4px solid #4c9b80;
  border-radius: 9px;
  padding: 20px 22px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: .25s;
  font-size: 13px;
  line-height: 1.6;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.error {
  border-left-color: #b54f4f;
}
.activity-item {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 15px;
  align-items: center;
}
.activity-item .icon {
  color: #6794b1;
}
.activity-item strong {
  font-size: 12px;
}
.activity-item p {
  font-size: 11px;
  color: #8b9ba6;
  margin-top: 5px;
}
.permission-table {
  white-space: normal;
}
.permission-table td {
  font-size: 12px;
}
.document-preview {
  width: 100%;
  height: 55vh;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.preview-text {
  white-space: pre-wrap;
  background: #f6f9fb;
  padding: 20px;
  font: 13px/1.8 monospace;
  max-height: 50vh;
  overflow: auto;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.login-brand {
  background: linear-gradient(130deg,#102d45,#206789);
  padding: 60px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand .brand {
  color: white;
  width: max-content;
  padding: 0;
}
.login-brand h1 {
  font-size: 42px;
  line-height: 1.3;
  margin: 20px 0;
}
.login-brand p {
  color: #b9d1e0;
  line-height: 1.9;
}
.login-brand>small {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #9cbed1;
}
.login-form {
  width: min(370px,80%);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 50px 0;
}
.login-form h2 {
  font-size: 28px;
}
.login-form>p {
  color: var(--muted);
  font-size: 13px;
}
.login-form .kicker {
  margin: 0;
}
.login-form>small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.login-form .primary {
  justify-content: space-between;
}
.form-error {
  color: #af4848 !important;
  font-size: 12px !important;
}
.permissions-note {
  padding: 12px;
  background: #edf5fa;
  border-radius: 7px;
  font-size: 12px;
  color: #60829a;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width:1500px) {
  .hero {
    min-height: 285px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .ship-art {
    height: 280px;
  }
}
@media (max-width:1150px) {
  .sidebar {
    width: 215px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace {
    margin-left: 215px;
  }
  main {
    padding: 24px;
  }
  header {
    padding: 0 24px;
  }
  .hero h1 {
    font-size: 29px;
  }
  .hero {
    padding: 28px;
  }
  .folder-card {
    padding: 14px;
  }
  .doc-name {
    max-width: 230px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 15px;
  }
  .stat p {
    font-size: 10px;
  }
  .demo-banner {
    align-items: flex-start;
  }
  .hero-badge {
    font-size: 9px;
  }
}
@media (max-width:850px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }
  .brand {
    font-size: 24px;
    padding: 0;
  }
  .brand-symbol {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }
  .portal-label,.nav-section,.sidebar-bottom,.sidebar nav {
    display: none;
  }
  #site-nav {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .site-button {
    font-size: 11px;
    padding: 9px;
  }
  .site-button .icon {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  header {
    height: 55px;
  }
  .hero {
    min-height: 245px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .ship-art {
    right: -25px;
    width: 44%;
    opacity: .7;
  }
  .folder-grid {
    gap: 9px;
  }
  .folder-card strong {
    font-size: 11px;
  }
  .hero-badge {
    flex-wrap: wrap;
  }
  .header-right {
    gap: 10px;
  }
}
@media (max-width:580px) {
  main {
    padding: 16px;
  }
  .sidebar {
    display: flex;
    align-items: center;
    padding: 15px;
  }
  .sidebar .brand {
    margin-right: auto;
  }
  .site-button {
    font-size: 10px;
  }
  #site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 180px;
  }
  .site-button.active:after {
    display: none;
  }
  .site-button {
    width: auto;
    margin: 0;
    padding: 5px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .private-label {
    display: none;
  }
  header {
    padding: 0 17px;
  }
  .demo-banner {
    flex-direction: column;
    font-size: 10px;
  }
  .hero {
    padding: 23px;
    min-height: 265px;
  }
  .hero h1 {
    font-size: 29px;
  }
  .hero p {
    font-size: 11px;
  }
  .ship-art {
    width: 65%;
    right: -70px;
    bottom: -35px;
    opacity: .3;
  }
  .hero-badge {
    font-size: 9px;
    max-width: 260px;
  }
  .stats {
    gap: 7px;
    margin: 14px 0 26px;
  }
  .stat {
    padding: 12px 9px;
    gap: 8px;
  }
  .stat-icon {
    display: none;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat p {
    font-size: 9px;
    line-height: 1.5;
  }
  .section-heading {
    align-items: flex-end;
  }
  .section-heading h2 {
    font-size: 18px;
  }
  .kicker {
    font-size: 8px;
  }
  .section-heading .primary {
    font-size: 10px;
    padding: 10px;
    gap: 5px;
  }
  .folder-grid {
    grid-template-columns: repeat(2,1fr);
    margin-bottom: 20px;
  }
  .folder-card {
    padding: 16px;
  }
  .folder-card .folder-icon {
    margin-bottom: 11px;
  }
  .toolbar {
    padding: 0 15px 15px;
    flex-wrap: wrap;
  }
  .toolbar .search {
    flex-basis: 100%;
  }
  .toolbar select {
    flex: 1;
  }
  .panel-top {
    padding: 19px 15px 15px;
  }
  .panel-top p {
    line-height: 1.6;
  }
  .table-footer {
    padding: 13px;
    font-size: 9px;
    gap: 10px;
  }
  footer {
    flex-direction: column;
    gap: 8px;
  }
  dialog {
    padding: 20px;
  }
  .login-screen {
    display: block;
  }
  .login-brand {
    padding: 25px;
    min-height: 220px;
  }
  .login-brand h1 {
    font-size: 25px;
    margin: 12px 0;
  }
  .login-brand p,.login-brand>small,.login-brand .eyebrow {
    display: none;
  }
  .login-brand .brand {
    margin-bottom: 20px;
  }
  .login-form {
    padding: 35px 0;
  }
  .toast {
    right: 20px;
    bottom: 20px;
  }
}
@media (prefers-reduced-motion:reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* Biblioteca simplificada, sin categorías departamentales. */
.library-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 29px;
}
.library-title h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 7px 0 9px;
}
.library-title p {
  font-size: 13px;
  color: var(--muted);
}
.library-mark {
  height: 58px;
  width: 58px;
  background: #e7f0f7;
  color: #4a82a7;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.library-mark .icon {
  height: 29px;
  width: 29px;
}
.document-path {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.path-link {
  border: 0;
  background: transparent;
  color: #2b6d9d;
  font-weight: 600;
  padding: 5px 0;
}
.document-path>span {
  color: #97a8b5;
}
.document-path strong {
  font-weight: 500;
}
.library-permission {
  font-size: 11px;
  color: #8194a3;
  margin: 17px 3px;
  line-height: 1.8;
}
.library-folder {
  display: flex;
  justify-content: flex-start;
  text-align: left;
  align-items: center;
  gap: 13px;
  border: 0;
  background: none;
  color: #294a62;
  font-size: 14px;
  padding: 5px 0;
  min-width: 180px;
}
.library-folder .icon {
  flex-shrink: 0;
  color: #4c91be;
  fill: #e4f1f9;
  width: 31px;
  height: 31px;
}
.library-folder:hover {
  color: #146da6;
}
.folder-row td {
  padding-top: 19px;
  padding-bottom: 19px;
}
.folder-row:hover {
  background: #f2f8fc;
}
.login-right {
  display: flex;
  align-items: center;
}
.login-form {
  width: min(395px,82%);
  gap: 19px;
}
.login-sites {
  display: flex;
  gap: 20px;
  margin-top: 34px;
  font-size: 12px;
  color: #a7c9dd;
}
.login-sites span {
  border-top: 1px solid #ffffff35;
  padding-top: 10px;
  min-width: 60px;
}
.password-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding-right: 5px;
}
.password-input:focus-within {
  outline: 2px solid #a6cde5;
}
.password-input input {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
}
.password-input input:focus {
  outline: none;
}
.autofill-username {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: 0;
}
.login-form .permissions-note {
  font-size: 11px;
  line-height: 1.7;
}
.setup-account {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.setup-account legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 5px;
}
.setup-account input {
  width: 100%;
}
.setup-account label+label {
  margin-top: 11px;
}
.setup-account .confirm-label {
  font-size: 11px;
  color: var(--muted);
}
#setup-error {
  margin: 0;
}
.mobile-logout {
  display: none;
}
.demo-banner .text-button {
  font-size: 11px;
}
.save-choice {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.save-choice button {
  font-size: 12px;
}
.table-scroll table {
  min-width: 700px;
}
.doc-name {
  max-width: 360px;
}
.login-form .form-error:empty {
  display: none;
}
.login-form .text-button {
  padding: 4px 0;
}
.login-form .primary {
  padding: 14px 17px;
}
@media (max-width:850px) {
  .mobile-logout {
    display: inline-flex;
  }
  .sidebar nav {
    display: flex;
    grid-column: 1/-1;
    gap: 5px;
  }
  .sidebar nav .nav-button {
    font-size: 11px;
    width: auto;
    padding: 9px;
  }
  .sidebar .brand {
    grid-column: 1;
    grid-row: 1;
  }
  #site-nav {
    grid-column: 2;
    grid-row: 1;
  }
  .login-brand {
    padding: 35px;
  }
  .login-brand h1 {
    font-size: 32px;
  }
}
@media (max-width:580px) {
  .sidebar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .sidebar .brand {
    font-size: 22px;
  }
  #site-nav {
    max-width: 190px;
  }
  .sidebar nav {
    width: 100%;
  }
  .sidebar nav .nav-button {
    font-size: 10px;
    padding: 8px;
    flex: 1;
    gap: 5px;
  }
  .nav-button .icon {
    width: 15px;
    height: 15px;
  }
  .library-title {
    padding: 14px 0 23px;
  }
  .library-title h1 {
    font-size: 26px;
  }
  .library-title p {
    font-size: 11px;
  }
  .library-mark {
    width: 44px;
    height: 44px;
  }
  .panel-top {
    gap: 12px;
  }
  .panel-top .primary {
    font-size: 10px;
    padding: 10px;
    gap: 5px;
  }
  .document-path {
    font-size: 12px;
    gap: 7px;
  }
  .login-right {
    display: block;
  }
  .login-brand {
    min-height: 180px;
    padding: 27px;
  }
  .login-brand h1 {
    font-size: 25px;
    margin: 8px 0;
  }
  .login-sites {
    display: none;
  }
  .login-form {
    padding: 30px 0;
  }
  .save-choice {
    flex-wrap: wrap;
  }
  .save-choice button {
    flex: 1;
  }
  .demo-banner {
    gap: 5px;
  }
}
#connection-banner {
  display: block;
  line-height: 1.6;
}
#connection-banner[hidden] {
  display: none;
}
.doc-name {
  overflow-wrap: anywhere;
}
#modal:has(.document-preview) {
  width: min(1100px,95vw);
  max-width: 1100px;
}
#path-site {
  overflow-wrap: anywhere;
}
#refresh-btn:disabled {
  opacity: .65;
  cursor: wait;
}
/* Keep the account switch visible in both desktop and mobile headers. */
.switch-user {
  white-space: nowrap;
  font-size: 12px;
  padding: 9px 12px;
  gap: 7px;
}
@media (max-width:580px) {
  .switch-user {
    padding: 8px;
    font-size: 11px;
  }
  .switch-user .icon {
    display: none;
  }
  .header-right {
    gap: 6px;
  }
}

.document-preview {
  width: 100%;
  height: 70vh;
  border: 0;
  background: #f4f7fb;
}

/* Official logo: keep the original PNG and balance its transparent margins. */
.brand.brand-official {
  justify-content: center;
  gap: 0;
  padding: 0;
  min-width: 0;
  line-height: 0;
}
.brand-logo-frame {
  display: block;
  position: relative;
  width: 100%;
  max-width: 212px;
  aspect-ratio: 997 / 317;
  overflow: hidden;
}
.brand-logo {
  display: block;
  position: absolute;
  left: -3.41023069%;
  top: -21.13564669%;
  width: 106.51955868%;
  max-width: none;
  height: auto;
}
.sidebar .brand-official {
  width: 100%;
}
.login-brand .brand-official {
  width: min(280px, 100%);
}
.login-brand .brand-logo-frame {
  max-width: none;
}
@media (max-width:850px) {
  .sidebar .brand-official {
    width: min(156px, 100%);
  }
}
@media (max-width:580px) {
  .login-brand .brand-official {
    width: min(220px, 100%);
  }
}

/* Corporate modules extend the existing Boyd layout and color palette. */
/* Area selection sits above the workspace; only its sections appear at left. */
.area-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.area-button {
  min-width: 126px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid #dce6ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #58758b;
  font-size: 14px;
  font-weight: 600;
}
.area-button:hover { border-color: #9dbed6; background: #edf5fb; }
.area-button.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 8px #176caa1a; }
.area-button .icon { width: 20px; height: 20px; }
#module-nav {
  display: block;
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}
.area-section-title { color: var(--navy); font-size: 16px; letter-spacing: 0; padding: 8px 12px 14px; }
.nav-group { margin: 0 0 14px; }
.nav-subgroup-title { color: #72899a; font-size: 11px; font-weight: 700; padding: 8px 12px; }
#module-nav .site-button {
  min-height: 48px;
  padding: 13px 12px;
  margin: 3px 0;
  font-size: 14px;
  line-height: 1.4;
}
#module-nav .site-button span { min-width: 0; overflow-wrap: anywhere; }
#module-nav .site-button .icon { display: block; width: 20px; height: 20px; }
#module-nav .site-button.active { background: #eaf2f8; color: #176598; font-weight: 700; }
#document-shortcuts { border-top: 1px solid var(--border); padding-top: 10px; }
#document-shortcuts .nav-button { padding: 10px 13px; font-size: 12px; }
.sidebar-bottom { padding-top: 14px; }
.sidebar-bottom .help-box { padding: 12px; }
.sidebar-bottom .help-box > .icon { display: none; }
.sidebar-bottom .profile { margin-top: 14px; padding-top: 14px; }
#module-view { min-height: 240px; }
#module-view .panel-top h2 { font-size: 19px; }
#module-view .toolbar { flex-wrap: wrap; }
#module-view .toolbar .search { min-width: 220px; }
#module-view .empty > .icon { width: 35px; height: 35px; margin: 0 auto 14px; color: #76a0bd; }
#module-view .empty p { max-width: 560px; margin: 8px auto 0; line-height: 1.7; }
.module-loading { padding: 50px; text-align: center; color: var(--muted); }
.stack-form { display: flex; flex-direction: column; gap: 18px; }
.stack-form > p, .modal-intro { line-height: 1.7; color: #6d8190; font-size: 13px; }
.modal-intro { margin-bottom: 18px; }
.stack-form label, .form-grid label, .resource-picker label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #38556b;
}
.stack-form label small { font-size: 10px; color: var(--muted); font-weight: 400; line-height: 1.6; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; font-weight: 400; }
textarea {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 12px;
  resize: vertical;
  min-height: 78px;
}
textarea:focus { outline: 2px solid #a6cde5; border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.span-two { grid-column: 1 / -1; }
.stack-form > button[type=submit] { align-self: flex-start; }
.form-error:empty { display: none; }
.info-note { padding: 12px 14px; background: #eef5fa; border: 1px solid #dbe8f1; border-radius: 7px; font-size: 12px; line-height: 1.7; color: #466a82; }
#modal { max-height: 88vh; overflow-y: auto; }
#modal:has(.record-form), #modal:has(.record-details), #modal:has(.history-list), #modal:has(.roles-fieldset) { width: min(800px,95vw); max-width: 800px; }
#modal:has(.role-editor) { width: min(1200px,96vw); max-width: 1200px; }
#modal .modal-heading { margin-bottom: 22px; }
.section-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subpage-heading { margin-bottom: 18px; }
.subpage-heading > .row-actions { flex-wrap: wrap; justify-content: flex-end; }
.custom-fields { border-top: 1px solid var(--border); padding-top: 18px; }
.custom-fields p { color: var(--muted); font-size: 11px; margin: 9px 0 14px; }
.custom-field-row { display: grid; grid-template-columns: 1fr 1fr 35px; gap: 9px; margin-top: 9px; }
.custom-field-row input { min-width: 0; font-size: 12px; }
.custom-field-row .icon-button { font-size: 20px; }
.record-details { padding: 0 24px 24px; margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 28px; }
#modal .record-details { padding: 0; margin: 0 0 24px; }
.record-details dt { color: #8a9ca9; font-size: 10px; margin-bottom: 7px; }
.record-details dd { color: #345268; font-size: 13px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-footer { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding: 20px 24px; }
.record-name { color: #38566d; font-size: 12px; }
.table-subtitle { display: block; font-size: 10px; color: #8b9eac; margin-top: 6px; }
.wrap-cell { white-space: normal; overflow-wrap: anywhere; min-width: 160px; max-width: 350px; line-height: 1.6; }
.muted { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }
.status-chip, .alert-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; border-radius: 5px; padding: 6px 9px; white-space: nowrap; line-height: 1.3; }
.status-chip.active, .status-chip.available, .alert-badge.green { background: #eaf5ef; color: #3d8a69; }
.status-chip.inactive, .status-chip.retired, .alert-badge.gray { background: #edf1f4; color: #81929e; }
.status-chip.maintenance, .status-chip.repair, .alert-badge.yellow { background: #fff5dc; color: #a37b22; }
.status-chip.admin { background: #eaf2f8; color: #31729d; }
.alert-badge.red { background: #fceceb; color: #bb5c55; }
.danger-text { color: #b86159; }
.small-button { font-size: 10px; padding: 7px 10px; }
.dashboard-intro { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; color: #8496a4; font-size: 11px; }
.dashboard-intro strong { color: #4f6b7f; font-weight: 500; }
.corporate-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: white; padding: 18px 21px; border: 1px solid var(--border); border-radius: 9px; text-align: left; color: #426176; min-height: 118px; }
.metric-card > span { font-size: 11px; color: #7d93a2; }
.metric-card > strong { font-family: Manrope,Arial,sans-serif; font-size: 27px; line-height: 1; color: #2c5875; }
.metric-card > small { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #8fa5b4; }
.metric-card small .icon { width: 12px; height: 12px; }
.metric-card.red { border-top: 3px solid #ca7b72; }
.metric-card.yellow { border-top: 3px solid #ddbe79; }
.metric-card.green { border-top: 3px solid #79af99; }
.metric-card.selected { border-color: #6fabcF; box-shadow: 0 0 0 2px #e7f1f8; }
.metric-card:hover { background: #fafdff; border-color: #9fc0d6; }
.vehicle-health-panel { margin-top: 24px; }
.vehicle-health-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; padding: 0 23px 23px; }
.vehicle-health-card { border: 1px solid var(--border); padding: 17px; border-radius: 8px; }
.vehicle-health-card > p { margin: 7px 0 15px; font-size: 10px; color: var(--muted); }
.vehicle-health-card > div { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; font-size: 11px; }
.vehicle-health-card small { display: block; font-size: 9px; margin-top: 5px; color: #8ca0ad; line-height: 1.6; }
.traffic-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; margin-top: 3px; border-radius: 50%; background: #b4c0c9; }
.traffic-dot.green { background: #6ca78d; }.traffic-dot.yellow { background: #dbb667; }.traffic-dot.red { background: #c6746d; }.traffic-dot.gray { background: #b5c0c8; }
.panel-empty-note { padding: 0 24px 24px; font-size: 11px; line-height: 1.8; color: #8095a4; }
.settings-form { padding: 0 24px 25px; max-width: 850px; }
.legend-row { display: flex; gap: 8px; flex-wrap: wrap; }
.audit-toolbar > label:not(.search) { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.audit-toolbar input[type=date] { padding: 8px; font-size: 11px; }
.history-entry { padding: 16px 0; border-bottom: 1px solid var(--border); }
.history-entry:first-child { padding-top: 0; }
.history-entry > div:first-child { display: flex; align-items: center; gap: 10px; color: #45677d; font-size: 12px; }
.history-entry > p { margin: 9px 0 9px 29px; color: #8b9ca8; font-size: 10px; }
.history-entry summary { cursor: pointer; color: #4c83a7; font-size: 11px; margin: 12px 0; }
.change-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.change-grid strong { font-size: 10px; color: #8a9ca8; }
.change-grid pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f8fb; border-radius: 6px; padding: 12px; font: 10px/1.7 monospace; max-height: 280px; overflow: auto; }
.category-manager { display: flex; flex-direction: column; gap: 6px; }
.category-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.category-item > span { flex: 1; font-size: 13px; }
.checkbox-list { display: flex; flex-direction: column; gap: 12px; }
.stack-form .checkbox-label { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 12px; font-weight: 400; line-height: 1.6; }
.stack-form .checkbox-label input { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; flex: 0 0 16px; accent-color: var(--blue); }
.roles-fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin: 0; }
.roles-fieldset legend { padding: 0 6px; font-size: 12px; font-weight: 600; color: #527086; }
.roles-fieldset > p { font-size: 11px; line-height: 1.7; color: #8799a7; margin-bottom: 16px; }
.role-checkboxes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.role-checkboxes small { display: block; margin-top: 3px; }
.roles-grid { padding: 0 24px 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.role-card { padding: 19px; border: 1px solid var(--border); border-radius: 8px; }
.role-card > div:first-child { display: flex; gap: 10px; align-items: flex-start; color: #4c7d9d; }
.role-card h3 { font-size: 14px; }
.role-card > p { color: #8b9eab; font-size: 11px; margin: 12px 0 10px; line-height: 1.6; }
.role-card > small { color: #9baab5; font-size: 10px; }
.role-card .row-actions { justify-content: flex-start; margin-top: 17px; }
.permission-matrix { border: 1px solid var(--border); border-radius: 7px; }
.permission-matrix table { min-width: 980px; }
.permission-matrix th { font-size: 10px; text-transform: none; }
.permission-matrix td { padding: 11px 8px; }
.permission-matrix td:first-child { min-width: 220px; max-width: 280px; padding-left: 14px; color: #506f85; }
.permission-matrix select { font-size: 10px; padding: 7px 5px; min-width: 82px; }
.permission-row-actions { display: flex; gap: 12px; margin-top: 6px; }
.permission-row-actions .text-button { font-size: 9px; padding: 0; }
.resource-picker { display: flex; align-items: flex-end; gap: 12px; }
.resource-picker label { flex: 1; min-width: 0; }
.resource-picker select { width: 100%; font-size: 11px; }
@media (max-width:1050px) {
  .vehicle-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel-top { flex-wrap: wrap; }
}
@media (max-width:850px) {
  /* Preserve reading order on small screens: area, then its sections. */
  #shell { display: flex; flex-direction: column; }
  .sidebar, .workspace { display: contents; }
  .sidebar > .brand.brand-official { order: 0; width: 156px; margin: 20px; }
  .workspace > header { order: 1; min-height: 55px; }
  .area-nav { order: 2; padding: 16px; gap: 10px; }
  .area-button { min-width: 126px; font-size: 13px; }
  .sidebar > .portal-label, .sidebar-bottom { display: none; }
  #module-nav { order: 3; display: block; width: auto; margin: 0; padding: 16px 20px 10px; min-height: 0; overflow: visible; background: #fff; }
  .area-section-title { padding: 0 0 10px; font-size: 15px; }
  .nav-subgroup-title { padding: 8px 0; }
  .nav-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .nav-subgroup-title { flex-basis: 100%; }
  #module-nav .site-button { width: auto; min-height: 46px; margin: 0; padding: 11px 13px; }
  #module-nav .site-button.active:after { display: none; }
  #document-shortcuts { order: 4; display: flex; flex-wrap: wrap; width: auto; gap: 6px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border); }
  #document-shortcuts .nav-button { width: auto; flex: 0 1 auto; }
  .workspace > main { order: 5; width: 100%; }
  .corporate-metrics { gap: 10px; }
  .roles-grid { grid-template-columns: 1fr; }
}
@media (max-width:580px) {
  .area-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .area-button { width: 100%; min-width: 0; padding: 11px 9px; font-size: 12px; }
  #module-nav .site-button { font-size: 13px; }
  #module-view .panel-top > .row-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .form-grid, .record-details, .role-checkboxes, .change-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .corporate-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .metric-card { padding: 14px; min-height: 109px; }
  .metric-card > span { font-size: 10px; }
  .metric-card > strong { font-size: 24px; }
  .vehicle-health-grid { grid-template-columns: 1fr; padding: 0 15px 16px; }
  .record-details { padding: 0 16px 20px; gap: 16px; }
  .record-footer { padding: 16px; }
  .subpage-heading { align-items: flex-start; flex-direction: column; }
  .resource-picker { flex-direction: column; align-items: stretch; }
  .custom-field-row { grid-template-columns: 1fr 28px; }
  .custom-field-row .custom-value { grid-column: 1; }
  .custom-field-row button { grid-column: 2; grid-row: 1 / 3; }
  .roles-grid { padding: 0 15px 16px; }
  .settings-form { padding: 0 16px 20px; }
  #module-view .toolbar .search { min-width: 0; }
}
