* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0f1419;
  color: #e7ecf1;
}

.page-dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #151b22;
  border-bottom: 1px solid #2a3441;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.page-header p {
  margin: 0;
  color: #9aa7b5;
  font-size: 0.9rem;
}

.page-content {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 360px;
  background: #151b22;
  border-right: 1px solid #2a3441;
  overflow-y: auto;
  padding: 1rem;
}

.sidebar-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.sidebar-header p {
  margin: 0 0 1rem;
  color: #9aa7b5;
  font-size: 0.9rem;
}

.panel {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a3441;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa7b5;
}

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.panel-heading-row h2 {
  margin: 0;
}

.subpanel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2a3441;
}

.subpanel h3 {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa7b5;
}

.project-card {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #1c2430;
  border: 1px solid #2a3441;
  border-radius: 6px;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.project-desc {
  font-size: 0.8rem;
  color: #9aa7b5;
  line-height: 1.4;
}

.create-project-form {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #1a2835;
  border: 1px solid #2a3441;
  border-radius: 6px;
}

.create-project-form .primary-btn,
.create-project-form .secondary-btn {
  width: auto;
  flex: 1;
}

.compact-btn {
  padding: 0.35rem 0.65rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #1c2430;
  color: #e7ecf1;
  cursor: pointer;
  font-size: 0.75rem;
  white-space: nowrap;
}

.compact-btn:hover {
  border-color: #0696d7;
}

.model-tools {
  margin-top: 0.75rem;
}

.section-label {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7ee787;
}

.section-label.other-label {
  color: #9aa7b5;
}

.project-dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-dashboard-card {
  padding: 0.75rem;
  background: #1c2430;
  border: 1px solid #2a3441;
  border-radius: 6px;
}

.project-dashboard-card.matching {
  border-color: #3d7a53;
  background: #15261c;
}

.project-dashboard-card .card-title {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.project-dashboard-card .card-title strong {
  font-size: 0.92rem;
}

.project-dashboard-card .spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.spec-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  background: #2a3441;
  color: #c9d4df;
}

.spec-tag.match {
  background: #1f4d33;
  color: #b8f0c8;
}

.project-dashboard-card .card-actions {
  margin-top: 0.65rem;
}

.header-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
}

.account-menu {
  position: relative;
}

.account-avatar-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid #3a4656;
  border-radius: 50%;
  background: #1c2430;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-avatar-btn:hover,
.account-menu.open .account-avatar-btn {
  border-color: #7eb6ff;
}

.account-avatar-img,
.account-avatar-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.account-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: #c5d0dc;
  background: #243040;
}

.account-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 10rem;
  padding: 0.35rem;
  background: #151b22;
  border: 1px solid #2a3441;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 40;
}

.account-menu.open .account-menu-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-menu-dropdown a,
.account-menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #e7ecf1;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-dropdown a:hover,
.account-menu-dropdown button:hover {
  background: #243040;
}

.account-language-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem 0.55rem;
  border-top: 1px solid #2a3441;
  margin-top: 0.25rem;
}

.account-language-label {
  font-size: 0.72rem;
  color: #9aa7b5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-language-select {
  width: 100%;
  padding: 0.4rem 0.45rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #0c1116;
  color: #e7ecf1;
  font: inherit;
  font-size: 0.85rem;
}

.upload-btn {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  background: #0696d7;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.upload-btn:hover {
  background: #0580b8;
}

.model-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.model-item {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #1c2430;
  border: 1px solid #2a3441;
  border-radius: 6px;
  cursor: pointer;
}

.model-item:hover,
.model-item.active {
  border-color: #0696d7;
  background: #1a2835;
}

.model-item .name {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.model-item .meta {
  font-size: 0.75rem;
  color: #9aa7b5;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toolbar.row {
  flex-direction: row;
  flex-wrap: wrap;
}

.toolbar.row button {
  flex: 1;
  min-width: 5rem;
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #9aa7b5;
  line-height: 1.4;
}

.field-label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  color: #9aa7b5;
}

textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #0f1419;
  color: #e7ecf1;
  font: inherit;
  resize: vertical;
}

textarea:disabled {
  opacity: 0.45;
}

.secondary-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #1c2430;
  color: #e7ecf1;
  cursor: pointer;
  width: 100%;
}

.secondary-btn:hover:not(:disabled) {
  border-color: #0696d7;
}

.secondary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.text-notes-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.text-note-item {
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
  background: #1c2430;
  border: 1px solid #2a3441;
  border-radius: 6px;
  font-size: 0.85rem;
}

.text-note-item .meta {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: #9aa7b5;
}

.toolbar button {
  padding: 0.5rem 0.75rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #1c2430;
  color: #e7ecf1;
  cursor: pointer;
}

.toolbar button:hover:not(:disabled) {
  border-color: #0696d7;
}

.toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #9aa7b5;
  min-height: 1.2rem;
}

.status.error {
  color: #ff7b72;
}

.status.success {
  color: #7ee787;
}

.viewer-area {
  flex: 1;
  position: relative;
  background: #0b0f14;
  overflow: hidden;
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #0b0f14;
  overflow: hidden;
}

.main-workspace {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.25rem 1.5rem 2rem;
  background: #0f1419;
}

.main-workspace:has(#dvResponsePanel:not(.hidden)) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-workspace:has(#dvResponsePanel:not(.hidden)) .main-workspace-body {
  flex: 1;
  min-height: 0;
  height: auto;
}

.main-workspace.hidden,
.viewer-area.hidden {
  display: none;
}

.main-area > .viewer-area {
  flex: 1;
  min-height: 0;
}

.workspace-empty {
  max-width: 28rem;
  margin: 3rem auto;
  text-align: center;
  color: #9aa7b5;
}

.workspace-empty .hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.workspace-empty.hidden {
  display: none;
}

.main-workspace-body {
  max-width: 920px;
}

.main-workspace-body:has(#dvResponsePanel:not(.hidden)) {
  max-width: min(1200px, 100%);
  height: calc(100vh - 7rem);
  min-height: 420px;
}

.main-workspace-body > .sidebar-view-panel {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.main-workspace-body .panel-heading-row h2 {
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
}

.part-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.part-label-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0696d7;
  box-shadow: 0 0 0 2px rgba(6, 150, 215, 0.35);
}

.part-label-marker.preview {
  background: #ffcc00;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.45);
  pointer-events: none;
}

.part-label {
  position: absolute;
  max-width: 220px;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(6, 150, 215, 0.92);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  word-wrap: break-word;
}

.viewer {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.viewer-status {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.5rem 1rem;
  background: rgba(21, 27, 34, 0.92);
  border: 1px solid #2a3441;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
}

.viewer-status.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.primary-btn {
  margin-top: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: #0696d7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}

.primary-btn:hover {
  background: #0580b8;
}

.link-btn {
  background: none;
  border: none;
  color: #69b7ff;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #2a3441;
  border-radius: 6px;
  background: #0f1419;
  color: #e7ecf1;
  font: inherit;
}

.brief-box {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #1a2835;
  border: 1px solid #2a3441;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.brief-box p {
  margin: 0.35rem 0 0;
  color: #c9d4df;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  background: #2a3441;
  color: #c9d4df;
  vertical-align: middle;
}

.assigned-dv-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.assigned-dv-group {
  padding: 0.75rem;
  background: #1c2430;
  border: 1px solid #2a3441;
  border-radius: 6px;
}

.assigned-dv-group .section-label {
  margin-top: 0;
}

.assigned-dv-group .text-note-item .card-title {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.assigned-dv-group .text-note-item strong {
  font-size: 0.88rem;
}

.component-tree {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.component-tree .tree-node {
  margin: 0.15rem 0;
}

.component-tree .tree-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

.component-tree .tree-label:hover {
  background: #1c2430;
}

.component-tree .tree-label-project {
  background: #1c2430;
  border: 1px solid #2a3441;
}

.component-tree .tree-toggle {
  display: inline-block;
  width: 0.9rem;
  color: #9aa7b5;
  font-size: 0.75rem;
}

.component-tree .tree-children {
  margin-left: 0.85rem;
  padding-left: 0.55rem;
  border-left: 1px solid #2a3441;
}

.component-tree .tree-node.collapsed > .tree-children {
  display: none;
}

.component-tree .tree-leaf {
  padding: 0.35rem 0.45rem;
  margin: 0.15rem 0;
  background: #151b22;
  border: 1px solid #2a3441;
  border-radius: 4px;
}

.component-tree .tree-component-link {
  background: none;
  border: none;
  color: #7ec8f0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.component-tree .tree-leaf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.component-tree .assignee-controls {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid #2a3441;
}

.component-tree .assignee-controls select {
  width: 100%;
  margin-bottom: 0.35rem;
}

.post-upload-invite {
  margin-top: 0.75rem;
}

.assigned-model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.assigned-model-badges .badge {
  font-size: 0.75rem;
}

.component-tree .tree-additionals > .tree-label {
  color: #c9a227;
}

.component-tree .tree-gap-reason {
  font-size: 0.8rem;
  opacity: 0.85;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  background: #151b22;
  border: 1px solid #2a3441;
  border-radius: 10px;
}

.login-card h1 {
  margin: 0;
}

.login-card .subtitle {
  margin: 0.25rem 0 1.25rem;
  color: #9aa7b5;
}

.login-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.role-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.profile-layout .profile-hero {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-photo-wrap {
  flex-shrink: 0;
}

.profile-photo,
.profile-photo-placeholder {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2a3441;
  background: #1c2430;
}

.profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  color: #9aa7b5;
}

.profile-hero-text h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  text-transform: none;
}

.profile-hero-text .primary-btn {
  margin-top: 0.75rem;
}

a.user-link {
  color: #7eb6ff;
  text-decoration: none;
}

a.user-link:hover {
  text-decoration: underline;
}

.hub-panel {
  border-bottom: 1px solid #2a3441;
}

.sidebar-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sidebar-nav-btn {
  border: 1px solid #3a4656;
  background: #1c2430;
  color: #e7ecf1;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.sidebar-nav-btn:hover {
  border-color: #5b6b7f;
  background: #243040;
}

.sidebar-nav-btn.active {
  border-color: #7eb6ff;
  background: #243a55;
  color: #fff;
}

.sidebar-views {
  padding-bottom: 1.5rem;
}

.sidebar-view-panel .panel-heading-row {
  margin-bottom: 0.75rem;
}

.invite-user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.invite-user-row select {
  flex: 1;
  min-width: 0;
}

.invite-user-row .user-link {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .profile-layout .profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.admin-page {
  max-width: 1200px;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tab {
  background: #1c2430;
  border: 1px solid #2a3441;
  color: #c5d0db;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.admin-tab.active {
  background: #2a3a4d;
  border-color: #4a6a88;
  color: #fff;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.admin-partner-lists {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.admin-partner-lists .admin-entity-list {
  max-height: 280px;
}

.admin-search {
  width: 11rem;
  max-width: 100%;
}

.admin-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.admin-list-filters .admin-search {
  width: 9.5rem;
}

.model-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.65rem 0 0.85rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #2a3441;
  border-radius: 10px;
  background: #151b24;
}

.model-identity .compact-btn {
  margin-left: auto;
  flex: 0 0 auto;
}

.model-mini-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #3a4656;
  background: #1c2430;
}

.model-mini-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.model-mini-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9eb6d0;
  background: linear-gradient(145deg, #243041, #1a222e);
}

.model-identity-text {
  min-width: 0;
  flex: 1;
}

.model-identity-name {
  font-weight: 650;
  color: #e8eef6;
  line-height: 1.25;
  word-break: break-word;
}

.model-identity-text .meta {
  margin-top: 0.15rem;
}

.dv-model-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  margin: 0.55rem 0 0.75rem;
  padding: 0.15rem;
}

.dv-model-picker-select {
  max-height: none;
  overflow: visible;
}

.dv-model-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  padding: 0.45rem;
  border: 1px solid #2a3441;
  border-radius: 10px;
  background: #151b24;
  color: #d7e2ef;
  cursor: pointer;
}

.dv-model-card:hover {
  border-color: #5b7ea8;
  background: #1a2430;
}

.dv-model-card.selected {
  border-color: #7eb6ff;
  box-shadow: inset 0 0 0 1px #7eb6ff55;
}

.dv-model-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #3a4656;
  background: #1c2430;
}

.dv-model-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dv-model-card-thumb .model-mini-avatar-fallback {
  font-size: 0.95rem;
}

.dv-model-card-name {
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
  word-break: break-word;
}

.ratings-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 0.75rem;
}

.ratings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ratings-table th,
.ratings-table td {
  border-bottom: 1px solid rgba(158, 182, 208, 0.25);
  padding: 0.45rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.ratings-table th {
  font-weight: 600;
  color: #9eb6d0;
  white-space: nowrap;
}

.ratings-table select,
.ratings-table textarea {
  width: 100%;
  min-width: 0;
}

.ratings-table textarea {
  min-height: 2.4rem;
  resize: vertical;
}

.ratings-table .ratings-user-cell {
  min-width: 8rem;
}

.ratings-table .ratings-score-cell {
  width: 5.5rem;
}

.ratings-table .ratings-action-cell {
  width: 5.5rem;
  white-space: nowrap;
}


#dvResponsePanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

#dvResponsePanel > .panel-heading-row {
  flex: 0 0 auto;
}

.dv-response-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dv-response-stage.hidden {
  display: none;
}

.dv-response-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.85fr);
  gap: 0.85rem;
}

.dv-response-main,
.dv-response-annotations {
  min-height: 0;
  border: 1px solid #2a3441;
  border-radius: 10px;
  background: #121820;
  display: flex;
  flex-direction: column;
}

.dv-response-main-scroll,
.dv-response-annotations-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem;
}

.dv-response-annotations-header {
  flex: 0 0 auto;
  padding: 0.75rem 0.75rem 0.35rem;
  border-bottom: 1px solid #2a3441;
}

.dv-response-annotations-header h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.procedure-cite-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #1c2430;
  border: 1px solid #2f3b4c;
  color: #d7e2ef;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.procedure-cite-btn:hover {
  border-color: #5b7ea8;
  background: #223044;
}

.procedure-cite-btn .meta {
  margin-top: 0.2rem;
}

#dvProcedureIntro,
#dvProcedureConclusion,
#dvNewStepBody,
textarea[data-step-body] {
  width: 100%;
}

@media (max-width: 900px) {
  .dv-response-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(240px, 1fr) minmax(200px, 0.85fr);
  }
}

.admin-entity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow: auto;
}

.admin-entity-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid #2a3441;
  border-radius: 4px;
  margin-bottom: 0.45rem;
  cursor: pointer;
  background: #121820;
}

.admin-entity-item:hover,
.admin-entity-item.selected {
  border-color: #4a6a88;
  background: #1a2430;
}

.admin-form .field-label {
  margin-top: 0.65rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
}

@media (max-width: 860px) {
  .admin-split {
    grid-template-columns: 1fr;
  }
}

.meeting-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 12, 18, 0.72);
}

.meeting-modal.hidden {
  display: none;
}

.meeting-modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #121820;
  border: 1px solid #2a3441;
  border-radius: 8px;
  padding: 1rem 1.1rem 1.25rem;
}

.meeting-invitee-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow: auto;
  margin: 0.35rem 0 0.75rem;
  padding: 0.5rem;
  border: 1px solid #2a3441;
  border-radius: 4px;
}

.meeting-invitee-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.user-identity {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.schedule-meeting-link {
  font-size: 0.8rem;
  padding: 0;
  border: none;
  background: none;
  color: #7eb6ff;
  cursor: pointer;
  text-decoration: underline;
}

.jaas-meet-frame {
  width: 100%;
  min-height: 560px;
  background: #0b1016;
  border: 1px solid #2a3441;
  border-radius: 4px;
  overflow: hidden;
}

.meeting-actions {
  margin-top: 0.45rem;
}

