/* ═══════════════════════════════════════════
   Object Access modal — modern Karman UI
   ═══════════════════════════════════════════ */

/* Page lock while modal open */
body.oa-modal-open {
  overflow: hidden !important;
}

/* Badges on cards */
.oa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
  white-space: nowrap;
}
.oa-badge-viewer {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.32);
}
.oa-badge-editor {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.32);
}

.oa-open-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

/* Overlay */
#object-access-modal.modal-overlay {
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: oaFadeIn 0.18s ease;
}
#object-access-modal.modal-overlay.hidden {
  display: none !important;
  animation: none;
}
#object-access-modal.is-busy {
  cursor: progress;
}
#object-access-modal.is-busy .oa-modal {
  pointer-events: none;
  opacity: 0.92;
}

@keyframes oaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes oaSheetIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Sheet */
.oa-modal {
  width: min(480px, 100%);
  max-width: 480px;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 22px !important;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(220, 38, 38, 0.18), transparent 55%),
    linear-gradient(180deg, #2a384c 0%, #1e2a3a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 64px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden;
  animation: oaSheetIn 0.22s cubic-bezier(0.2, 0.85, 0.25, 1);
}

.oa-modal .modal-header {
  flex: 0 0 auto;
  padding: 18px 20px 8px !important;
  border-bottom: none !important;
  align-items: flex-start;
}
.oa-modal .modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.oa-modal .modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.15s;
}
.oa-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.oa-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 20px 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.oa-sub {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}
.oa-obj-name {
  color: #fff;
  font-weight: 650;
}

/* Search */
.oa-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.oa-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px 13px 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E")
      no-repeat 14px center,
    rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.oa-search-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}
.oa-search-input:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
  background-color: rgba(0, 0, 0, 0.35);
}

/* Role for new grant */
.oa-role-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.oa-role-row label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
#object-access-role.oa-role-select {
  flex: 1;
  min-width: 0;
}

.oa-role-select,
select.oa-role-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 32px 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
      no-repeat right 10px center,
    rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.oa-role-select:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.45);
}
.oa-role-select--entry {
  font-size: 0.8rem;
  padding: 7px 28px 7px 10px;
  max-width: 148px;
}

/* Search results */
.oa-results {
  margin: 0 0 14px;
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.oa-results.hidden {
  display: none !important;
}

.oa-search-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.oa-search-item:last-child {
  border-bottom: 0;
}
.oa-search-item:hover,
.oa-search-item:focus-visible {
  background: rgba(220, 38, 38, 0.14);
  outline: none;
}
.oa-search-text {
  flex: 1;
  min-width: 0;
}
.oa-search-text strong {
  font-weight: 650;
  font-size: 0.92rem;
}
.oa-search-add {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fca5a5;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.28);
}

/* Section */
.oa-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 10px;
}
.oa-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin: 0;
}
.oa-section-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.oa-section-count:empty {
  display: none;
}

/* Entries */
.oa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.oa-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.oa-entry:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.oa-entry-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.oa-avatar-img,
.oa-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
}
.oa-avatar-img {
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.oa-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    145deg,
    hsl(var(--oa-hue, 0), 55%, 42%),
    hsl(var(--oa-hue, 0), 60%, 28%)
  );
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.oa-entry-meta {
  flex: 1;
  min-width: 0;
}
.oa-entry-name {
  font-weight: 650;
  font-size: 0.94rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oa-entry-sub {
  margin-top: 4px;
}
.oa-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.oa-chip-viewer {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}
.oa-chip-editor {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

.oa-entry-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.oa-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.oa-remove-btn:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.35);
  color: #fca5a5;
}

/* Empty / loading */
.oa-empty {
  padding: 28px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.9rem;
  line-height: 1.45;
}
.oa-empty p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.oa-empty-ico {
  opacity: 0.45;
  color: rgba(255, 255, 255, 0.7);
}
.oa-empty-hint {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  opacity: 0.75;
}
.oa-error {
  color: #fca5a5 !important;
}
.oa-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.oa-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #f87171;
  animation: oaSpin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes oaSpin {
  to { transform: rotate(360deg); }
}

/* Hint */
.oa-hint {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}
.oa-hint strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
}

/* Footer */
.oa-modal .modal-actions {
  flex: 0 0 auto;
  padding: 12px 20px 18px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}
.oa-modal .modal-actions .btn-primary {
  min-width: 120px;
  border-radius: 12px;
}

@media (max-width: 520px) {
  .oa-modal {
    max-height: 92vh;
    border-radius: 18px 18px 0 0 !important;
    margin-top: auto;
  }
  #object-access-modal.modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .oa-entry {
    flex-wrap: wrap;
  }
  .oa-entry-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 4px;
  }
  .oa-role-select--entry {
    max-width: none;
    flex: 1;
  }
}


/* ─── Own / Shared groups ─── */
.own-group,
.shared-group {
  margin-bottom: 28px;
}
.own-group-head,
.shared-group-head {
  margin-bottom: 12px;
}
.own-group-title,
.shared-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}
.own-group-count,
.shared-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.shared-group-title {
  color: #93c5fd;
}
.shared-group-title .shared-group-count {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}
.shared-group-ico {
  display: inline-flex;
  opacity: 0.9;
}
.shared-group-sub {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.shared-group-grid,
.own-group-grid {
  /* inherit project-grid / html grid from parent classes also applied */
}
.own-empty-hint {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.45;
}
.own-empty-hint strong {
  color: #fff;
}

/* Shared folder cards */
.project-card.is-shared,
.html-page-card.is-shared {
  border-color: rgba(96, 165, 250, 0.22);
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.06), transparent 42%),
    rgba(36, 48, 66, 0.55);
}
.project-card.is-shared:hover,
.html-page-card.is-shared:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.project-card-title-wrap,
.html-card-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.project-card-title-wrap .project-card-title,
.html-card-title-wrap h3 {
  margin: 0;
}

.oa-shared-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  border: 1px solid transparent;
}
.oa-shared-pill--viewer {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}
.oa-shared-pill--editor {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}
.oa-shared-pill-role {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.oa-shared-pill-from {
  padding-right: 4px;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.project-shared-note,
.html-shared-note {
  font-size: 0.78rem;
  color: rgba(147, 197, 253, 0.9);
  font-weight: 500;
  margin-top: 2px;
}
.project-shared-note strong,
.html-shared-note strong {
  color: #e0f2fe;
  font-weight: 700;
}
.project-shared-footer-tag {
  font-size: 0.8rem;
  font-weight: 650;
  color: #93c5fd;
}
.drag-handle-spacer {
  width: 28px;
  flex-shrink: 0;
}

/* Legacy badge keep */
.oa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
  white-space: nowrap;
}

.own-group-grid.project-grid,
.shared-group-grid.project-grid,
#html-pages-list .own-group-grid,
#html-pages-list .shared-group-grid {
  /* nested grids below */
}
/* parent list as flex column when grouped */
#projects-list:has(.own-group),
#projects-list:has(.shared-group),
#html-pages-list:has(.own-group),
#html-pages-list:has(.shared-group) {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#projects-list .own-group-grid,
#projects-list .shared-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: inherit;
}
#projects-list.view-list .own-group-grid,
#projects-list.view-list .shared-group-grid,
#html-pages-list.view-list .own-group-grid,
#html-pages-list.view-list .shared-group-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#projects-list.view-icons .own-group-grid,
#projects-list.view-icons .shared-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}


/* HTML page list row — clean modern layout */
.html-pages-grid.view-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.html-pages-grid.view-list .html-page-card.html-page-row {
  display: grid !important;
  grid-template-columns: 28px 32px minmax(0, 1.5fr) minmax(110px, 0.65fr) auto;
  align-items: center;
  column-gap: 14px;
  padding: 12px 14px 12px 12px !important;
  min-height: 58px;
  transform: none !important;
}
.html-pages-grid.view-list .html-page-card.html-page-row:hover {
  transform: none !important;
}
.html-pages-grid.view-list .html-page-row .html-page-check,
.html-pages-grid.view-list .html-page-row .html-page-check-spacer {
  grid-column: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.html-pages-grid.view-list .html-page-row .html-page-visual {
  grid-column: 2;
  margin: 0;
}
.html-pages-grid.view-list .html-page-row-main {
  grid-column: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.html-pages-grid.view-list .html-page-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}
.html-pages-grid.view-list .html-page-row-title h3 {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block !important;
  -webkit-line-clamp: unset !important;
}
.html-pages-grid.view-list .html-page-row-link {
  min-width: 0;
  max-width: 100%;
}
.html-pages-grid.view-list .html-page-row-link .html-public-link {
  max-width: 100%;
  padding: 3px 8px;
  font-size: 0.8rem;
  background: transparent;
  border-color: transparent;
  color: #7dd3fc !important;
}
.html-pages-grid.view-list .html-page-row-link .html-public-link:hover {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}
.html-pages-grid.view-list .html-public-link-text {
  max-width: min(440px, 36vw);
}
.html-pages-grid.view-list .html-page-row-meta {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
  color: rgba(255, 255, 255, 0.5);
}
.html-pages-grid.view-list .html-page-row-date {
  color: rgba(255, 255, 255, 0.38);
  font-weight: 500;
}
.html-pages-grid.view-list .html-page-row > .html-open-public-btn {
  grid-column: 5;
  justify-self: end;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.html-public-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  color: #7dd3fc !important;
  text-decoration: none !important;
  font-size: 0.84rem;
  font-weight: 550;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.18);
}
.html-public-link:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.35);
  color: #bae6fd !important;
}
.html-public-link svg { flex-shrink: 0; }
.html-public-link-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.html-public-link.is-empty {
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}
.html-open-public-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(145deg, #dc2626, #b91c1c);
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.22);
  white-space: nowrap;
}
.html-open-public-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #fff !important;
}
.html-icon-open-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.html-icon-open-wrap .html-open-public-btn {
  padding: 7px;
  font-size: 0;
  gap: 0;
}
.html-icon-open-wrap .html-open-public-btn span { display: none; }
.html-icon-card { position: relative; }
.html-pages-grid.view-grid .html-page-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.html-pages-grid.view-grid .html-page-card-footer .html-open-public-btn {
  margin-left: auto;
}
@media (max-width: 900px) {
  .html-pages-grid.view-list .html-page-card.html-page-row {
    grid-template-columns: 28px 28px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
  }
  .html-pages-grid.view-list .html-page-row-main { grid-column: 3; grid-row: 1; }
  .html-pages-grid.view-list .html-page-row > .html-open-public-btn { grid-column: 4; grid-row: 1; }
  .html-pages-grid.view-list .html-page-row-meta {
    grid-column: 3 / 5;
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
  }
}
@media (max-width: 560px) {
  .html-pages-grid.view-list .html-open-public-btn span { display: none; }
  .html-pages-grid.view-list .html-open-public-btn { padding: 8px; }
}

/* Folder access button on cards */
.html-folder-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.html-folder-access-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.html-icon-access-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}
.html-icon-access-wrap .html-folder-access-btn span {
  display: none;
}
.html-icon-access-wrap .html-folder-access-btn {
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}
#html-folder-access-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* ═══════════════════════════════════════════════════
   Access card — modern share-out UI (owner view)
   ═══════════════════════════════════════════════════ */

.oa-access-card {
  --oa-acc-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 12px 11px;
  border-radius: var(--oa-acc-radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(165deg, rgba(255,255,255,0.04) 0%, transparent 42%),
    rgba(12, 18, 28, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 8px 20px rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}
.oa-access-card:hover {
  border-color: rgba(96, 165, 250, 0.28);
  background:
    linear-gradient(165deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    rgba(16, 24, 38, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}
.oa-access-card:active {
  transform: translateY(0) scale(0.995);
}
.oa-access-card:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  outline-offset: 2px;
}

/* Empty state */
.oa-access-card--empty {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(12, 18, 28, 0.35);
  box-shadow: none;
}
.oa-access-card--empty:hover {
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(36, 48, 66, 0.55);
}

.oa-access-card-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.oa-access-card--empty:hover .oa-access-card-icon {
  color: #e2e8f0;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.22);
}

.oa-access-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.oa-access-card-label {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #f1f5f9;
  line-height: 1.25;
}
.oa-access-card-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.3;
}

.oa-access-card-action {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 650;
  color: #93c5fd;
  letter-spacing: 0.01em;
}
.oa-access-card--empty .oa-access-card-action {
  color: #cbd5e1;
}
.oa-access-card--shared .oa-access-card-action {
  color: #a5b4fc;
}

.oa-share-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  color: rgba(148, 163, 184, 0.75);
  transition: transform 0.15s ease, color 0.15s ease;
}
.oa-access-card:hover .oa-share-chevron {
  color: #e2e8f0;
  transform: translateX(2px);
}

/* Shared head */
.oa-access-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.oa-access-card-head-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.oa-access-card-head-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.oa-access-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.28);
  white-space: nowrap;
}

/* People list */
.oa-access-people {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.oa-access-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.oa-access-card:hover .oa-access-person {
  background: rgba(255, 255, 255, 0.045);
}
.oa-access-person-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e8eef7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.oa-access-role {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.oa-access-role--viewer {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.22);
}
.oa-access-role--editor {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.24);
}
.oa-access-more {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.9);
  padding: 0 8px;
}

/* Avatars */
.oa-avatar-stack {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.oa-av {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #1a2433;
  margin-right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--oa-hue, 210) 62% 48%), hsl(var(--oa-hue, 210) 55% 36%));
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.oa-av:last-child { margin-right: 0; }
.oa-av--md {
  width: 30px;
  height: 30px;
  margin-right: 0;
  font-size: 0.68rem;
  border-width: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.oa-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.oa-stack-more {
  margin-left: 10px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  border: 2px solid #1a2433;
  background: rgba(51, 65, 85, 0.85);
  color: #e2e8f0;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Compact pills (list / icons) */
.oa-share-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 35, 0.5);
  color: #e2e8f0;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
  max-width: 100%;
}
.oa-share-pill:hover {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(99, 102, 241, 0.12);
}
.oa-share-pill--empty {
  border-style: dashed;
  color: rgba(203, 213, 225, 0.85);
  padding-left: 8px;
}
.oa-share-pill--on {
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.12);
  color: #e0e7ff;
}
.oa-share-pill-ico {
  display: inline-flex;
  opacity: 0.85;
}
.oa-share-pill-count {
  font-weight: 750;
  font-size: 0.75rem;
  min-width: 1.1em;
}
.oa-share-pill .oa-avatar-stack .oa-av {
  width: 20px;
  height: 20px;
  font-size: 0.52rem;
  margin-right: -6px;
  border-width: 1.5px;
}
.oa-share-pill .oa-stack-more {
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  font-size: 0.55rem;
  border-width: 1.5px;
}

/* Card layout */
.html-page-card .oa-access-card,
.project-card .oa-access-card {
  margin-top: 10px;
}
.html-pages-grid.view-icons .oa-access-card,
.project-grid.view-icons .oa-access-card {
  padding: 8px;
  gap: 6px;
}
.html-pages-grid.view-icons .oa-access-person-name,
.project-grid.view-icons .oa-access-person-name {
  display: none;
}
.html-pages-grid.view-icons .oa-access-people,
.project-grid.view-icons .oa-access-people {
  flex-direction: row;
  flex-wrap: wrap;
}
.html-pages-grid.view-icons .oa-access-person,
.project-grid.view-icons .oa-access-person {
  padding: 2px;
  border: none;
  background: transparent;
}
.html-pages-grid.view-icons .oa-access-role,
.project-grid.view-icons .oa-access-role,
.html-pages-grid.view-icons .oa-access-card-action,
.project-grid.view-icons .oa-access-card-action {
  display: none;
}

/* Legacy class aliases (if any leftover) */
.oa-share-out { /* noop alias */ display: none; }

/* begin html-folder-list-row */
.html-pages-grid.view-list {
  gap: 6px !important;
}
.html-pages-grid.view-list .html-page-card {
  transform: none !important;
  min-height: 0;
}
.html-pages-grid.view-list .html-page-card:hover {
  transform: none !important;
}
.html-pages-grid.view-list .html-page-card.html-folder-row {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1.5fr) auto minmax(150px, 0.85fr) 34px;
  align-items: center;
  column-gap: 12px;
  padding: 8px 12px !important;
  min-height: 48px;
  border-radius: 12px;
  box-shadow: none;
}
.html-pages-grid.view-list .html-folder-row .html-page-visual {
  grid-column: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  filter: drop-shadow(0 2px 6px rgba(220, 38, 38, 0.22));
}
.html-pages-grid.view-list .html-folder-row .html-page-row-main {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.html-pages-grid.view-list .html-folder-row .html-page-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.html-pages-grid.view-list .html-folder-row .html-page-row-title h3 {
  margin: 0 !important;
  font-size: 0.92rem !important;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block !important;
  -webkit-line-clamp: unset !important;
}
.html-pages-grid.view-list .html-folder-row .oa-share-pill,
.html-pages-grid.view-list .html-folder-row .html-folder-actions {
  grid-column: 3;
  margin: 0;
  justify-self: start;
}
.html-pages-grid.view-list .html-folder-row .html-page-row-meta {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  justify-self: end;
  font-size: 0.75rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  min-width: 0;
}
.html-pages-grid.view-list .html-folder-row .html-page-row-files {
  color: #fca5a5;
  font-weight: 700;
}
.html-pages-grid.view-list .html-folder-row .html-page-row-date {
  color: rgba(255, 255, 255, 0.36);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.html-pages-grid.view-list .html-folder-row .html-folder-del-end,
.html-pages-grid.view-list .html-folder-row .html-folder-del-spacer {
  grid-column: 5;
  justify-self: end;
  width: 32px;
  height: 32px;
  opacity: 0.7;
  margin: 0;
}
.html-pages-grid.view-list .html-folder-row:hover .html-folder-del-end {
  opacity: 1;
}
.html-folder-del-spacer { display: inline-block; }
@media (max-width: 820px) {
  .html-pages-grid.view-list .html-page-card.html-folder-row {
    grid-template-columns: 26px minmax(0, 1fr) auto 32px;
    grid-template-rows: auto auto;
    row-gap: 4px;
    padding: 8px 10px !important;
  }
  .html-pages-grid.view-list .html-folder-row .html-page-row-main { grid-column: 2; grid-row: 1; }
  .html-pages-grid.view-list .html-folder-row .oa-share-pill { grid-column: 3; grid-row: 1; }
  .html-pages-grid.view-list .html-folder-row .html-page-row-meta {
    grid-column: 2 / 4;
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
  }
  .html-pages-grid.view-list .html-folder-row .html-folder-del-end,
  .html-pages-grid.view-list .html-folder-row .html-folder-del-spacer {
    grid-column: 4;
    grid-row: 1;
  }
}
/* end html-folder-list-row */
