/* Norvia Trip Workspace — database-backed progressive enhancement */
.nv-tw-db-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,.78);
}
.nv-tw-db-sync::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #84c18a;
  box-shadow: 0 0 0 3px rgba(132,193,138,.16);
}
.nv-tw-db-sync.nv-error::before { background: #c96f61; box-shadow: 0 0 0 3px rgba(201,111,97,.14); }
.nv-tw-db-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e5e7df;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(40,54,42,.045);
  margin: 0 0 14px;
}
.nv-tw-db-bar-copy { min-width: 0; }
.nv-tw-db-bar-copy strong { display:block; color:#2a3d2e; font-size:12px; }
.nv-tw-db-bar-copy span { display:block; margin-top:2px; color:#7c837b; font-size:10.5px; line-height:1.4; }
.nv-tw-db-people { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.nv-tw-db-avatars { display:flex; align-items:center; padding-left:8px; }
.nv-tw-db-avatar {
  width: 30px;
  height: 30px;
  margin-left: -8px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #e7eee6;
  color: #2a3d2e;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:800;
  overflow:hidden;
}
.nv-tw-db-avatar img { width:100%; height:100%; object-fit:cover; }
.nv-tw-db-count { font-size:10.5px; color:#697069; white-space:nowrap; }
.nv-tw-db-action {
  border: 1px solid #d9ddd5;
  background: #fff;
  color: #2a3d2e;
  border-radius: 9px;
  min-height: 34px;
  padding: 0 11px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor:pointer;
}
.nv-tw-db-action:hover { border-color:#b7c1b5; background:#f7f8f4; }
.nv-tw-db-action.nv-primary { background:#2a3d2e; color:#fff; border-color:#2a3d2e; }
.nv-tw-db-action.nv-warm { background:#2a3d2e; color:#fff; border-color:#2a3d2e; }
.nv-tw-db-action:disabled { cursor:not-allowed; opacity:.55; }

#nv-trip-db-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24,34,26,.48);
  backdrop-filter: blur(8px);
}
#nv-trip-db-modal.nv-open { display:flex; }
.nv-tw-db-modal-card {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  overflow:auto;
  background:#fbfbf8;
  border:1px solid rgba(255,255,255,.8);
  border-radius:20px;
  box-shadow:0 28px 80px rgba(20,30,22,.26);
}
.nv-tw-db-modal-head {
  position: sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px 22px 14px;
  background:rgba(251,251,248,.96);
  border-bottom:1px solid #e8e9e2;
  backdrop-filter:blur(10px);
}
.nv-tw-db-modal-head h2 { margin:0; color:#273c2d; font-size:20px; line-height:1.2; }
.nv-tw-db-modal-head p { margin:5px 0 0; color:#7b817b; font-size:11px; line-height:1.45; }
.nv-tw-db-close {
  width:34px; height:34px; border-radius:50%; border:1px solid #dfe2da; background:#fff; color:#596259; cursor:pointer; font-size:16px;
}
.nv-tw-db-modal-body { padding:20px 22px 24px; }
.nv-tw-db-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.nv-tw-db-field { display:flex; flex-direction:column; gap:6px; }
.nv-tw-db-field.nv-span-2 { grid-column:1 / -1; }
.nv-tw-db-field label { color:#596159; font-size:10.5px; font-weight:800; letter-spacing:.02em; }
.nv-tw-db-field input,
.nv-tw-db-field select {
  width:100%; min-height:42px; border:1px solid #dfe2da; border-radius:10px; background:#fff; padding:0 11px; color:#273129; font:inherit; font-size:12px; outline:none;
}
.nv-tw-db-field input:focus,
.nv-tw-db-field select:focus { border-color:#708573; box-shadow:0 0 0 3px rgba(91,119,95,.09); }
.nv-tw-db-readonly {
  min-height:42px; display:flex; align-items:center; border:1px dashed #d7dbd2; border-radius:10px; padding:0 11px; background:#f4f5f1; color:#6b716b; font-size:12px;
}
.nv-tw-db-note { margin-top:10px; color:#8a8f88; font-size:10.5px; line-height:1.45; }
.nv-tw-db-modal-actions { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-top:18px; }
.nv-tw-db-status { margin-right:auto; font-size:10.5px; color:#667066; }
.nv-tw-db-status.nv-error { color:#b65f50; }
.nv-tw-db-member-list { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.nv-tw-db-member {
  display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border:1px solid #e7e8e2; border-radius:12px; background:#fff;
}
.nv-tw-db-member .nv-tw-db-avatar { margin:0; width:36px; height:36px; }
.nv-tw-db-member-name { font-size:11.5px; color:#2e382f; font-weight:750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nv-tw-db-member-sub { margin-top:2px; font-size:9.5px; color:#8a9088; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nv-tw-db-role { padding:4px 7px; border-radius:999px; background:#eff3ed; color:#526654; font-size:9px; font-weight:800; white-space:nowrap; }
.nv-tw-db-divider { height:1px; background:#e7e9e2; margin:18px 0; }

@media (max-width: 720px) {
  .nv-tw-db-grid { grid-template-columns:1fr; }
  .nv-tw-db-field.nv-span-2 { grid-column:auto; }
  .nv-tw-db-bar { align-items:flex-start; flex-direction:column; }
  .nv-tw-db-people { width:100%; justify-content:space-between; }
}
