/* org-management.html — org owner/admin only */

.org-mgmt-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

.org-mgmt-hero {
  margin-bottom: 0.5rem;
}

.org-mgmt-hero .mvp-home-brand {
  min-height: 0;
}

.org-mgmt-hero .mvp-home-tagline {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.org-mgmt-hero .mvp-home-hero-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  max-width: 36rem;
  line-height: 1.45;
}

.org-mgmt-fatal {
  max-width: 700px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #8a3f3f;
  background: rgba(60, 24, 24, 0.45);
  color: #ffd4d4;
  font-size: 0.92rem;
}

.org-mgmt-denied {
  max-width: 44rem;
  line-height: 1.5;
  padding: 12px 14px;
  border: 1px solid #2a3a53;
  border-radius: 10px;
  background: #0f1826;
  margin: 0 0 1rem;
}

.org-mgmt-app [data-org-mgmt-lead] {
  margin: 0 0 0.75rem;
  line-height: 1.5;
  font-size: 0.92rem;
}

.org-mgmt-org-pick {
  display: block;
  margin: 0 0 1rem;
  max-width: 32rem;
}

.org-mgmt-org-pick-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: #b8c5d4;
}

.org-mgmt-org-pick select {
  width: 100%;
  max-width: 32rem;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #2a3a53;
  background: #0c1522;
  color: #e9f0f8;
  font-family: inherit;
  font-size: 0.92rem;
}

.org-mgmt-section {
  margin-top: 14px;
  padding: 16px 18px;
}

.org-mgmt-section h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.org-mgmt-pilot-hint,
.org-mgmt-section p.muted {
  margin: 0 0 10px;
  line-height: 1.5;
  font-size: 0.88rem;
  max-width: 44rem;
}

.org-mgmt-storage-toolbar {
  margin: 0 0 10px;
}

.org-mgmt-storage-status {
  min-height: 1.2em;
  font-size: 0.86rem;
  margin: 0 0 6px;
}

.org-mgmt-storage-summary {
  margin-top: 4px;
}

.org-mgmt-storage-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #e9f0f8;
}

.org-mgmt-storage-cap {
  font-size: 0.82rem;
}

.org-mgmt-storage-bar-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  border: 1px solid color-mix(in oklab, #2a3a53 90%, white 6%);
  background: #070c14;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.org-mgmt-storage-bar-fill {
  display: flex;
  height: 100%;
  min-width: 2px;
  border-radius: 6px;
  overflow: hidden;
  transition: width 0.25s ease;
}

.org-mgmt-storage-bar-seg {
  display: block;
  height: 100%;
  min-width: 0;
}

.org-mgmt-storage-bar-seg--footage {
  background: linear-gradient(180deg, #4a9eff 0%, #2a6ecd 100%);
}

.org-mgmt-storage-bar-seg--shots {
  background: linear-gradient(180deg, #6ed4b8 0%, #3aa884 100%);
}

.org-mgmt-storage-bar-fill.org-mgmt-storage-bar-fill--over {
  background: linear-gradient(180deg, #ffb86a 0%, #d97a2a 100%);
}

.org-mgmt-storage-bar-fill.org-mgmt-storage-bar-fill--over .org-mgmt-storage-bar-seg {
  display: none;
}

.org-mgmt-storage-breakdown {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.org-mgmt-license-toolbar {
  margin: 0 0 8px;
}

.org-mgmt-license-status {
  min-height: 1.2em;
  font-size: 0.86rem;
  margin: 0 0 4px;
}

.org-mgmt-license-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.org-mgmt-license-item {
  border: 1px solid color-mix(in oklab, #2a3a53 85%, white 8%);
  border-radius: 12px;
  background: linear-gradient(165deg, color-mix(in oklab, #0c1522 94%, white 3%) 0%, #0c1522 100%);
  padding: 10px 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 10px 28px -12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.org-mgmt-license-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.org-mgmt-license-item-head strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.org-mgmt-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

.org-mgmt-badge--ok {
  color: #b8f0d0;
  background: rgba(46, 160, 100, 0.2);
  border: 1px solid rgba(56, 180, 120, 0.35);
}

.org-mgmt-badge--revoked {
  color: #ffd0a8;
  background: rgba(180, 100, 40, 0.2);
  border: 1px solid rgba(200, 120, 60, 0.3);
}

.org-mgmt-license-item-meta {
  display: grid;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #b8c5d4;
}

.org-mgmt-field-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8fa6bc;
  margin-bottom: 4px;
  font-weight: 600;
}

.org-mgmt-key-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.65rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: #b8e0ff;
  background: rgba(62, 142, 255, 0.12);
  border: 1px solid rgba(62, 142, 255, 0.3);
  border-radius: 4px;
  vertical-align: middle;
}

.org-mgmt-key-pill--muted {
  color: #9ab0c8;
  background: rgba(120, 140, 160, 0.12);
  border-color: rgba(120, 140, 160, 0.25);
}

.org-mgmt-license-seat-total {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #c6d4e4;
}

.org-mgmt-license-line {
  padding: 8px 0 2px;
}

.org-mgmt-qr-block {
  padding: 10px 0 4px;
  border-top: 1px solid rgba(120, 160, 210, 0.12);
  margin-top: 2px;
}

.org-mgmt-warning-line {
  line-height: 1.5;
}

.org-mgmt-internal-row {
  padding-top: 4px;
  border-top: 1px dashed rgba(120, 160, 210, 0.2);
  margin-top: 2px;
}

.org-mgmt-uuid-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: #9ab0c8;
}

.org-mgmt-key-code {
  display: inline;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: #e9f0f8;
}

.org-mgmt-inline-qr {
  display: block;
  margin: 8px 0 0;
  max-width: 260px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  align-self: start;
}

.org-mgmt-inline-qr svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.org-mgmt-qr-inline-caption {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #5a5a5a;
}

.org-mgmt-license-empty {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.org-mgmt-qr-fallback {
  display: block;
  padding: 8px 0;
  font-size: 0.86rem;
}

.org-mgmt-team-intro {
  margin: 0 0 10px;
}

.org-mgmt-team-toolbar {
  margin: 0 0 10px;
}

.org-mgmt-team-status {
  min-height: 1.2em;
  font-size: 0.86rem;
  margin: 0 0 8px;
}

.org-mgmt-team-add {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #2a3a53;
  background: #0c1522;
}

.org-mgmt-team-add-grid {
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  align-items: end;
}

.org-mgmt-field {
  display: block;
}

.org-mgmt-field input,
.org-mgmt-field select {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #2a3a53;
  background: #0b1118;
  color: #e9f0f8;
  font-family: inherit;
  font-size: 0.92rem;
}

.org-mgmt-team-add-actions {
  display: flex;
  align-items: flex-end;
}

.org-mgmt-team-add-actions .primary {
  padding: 8px 14px;
  font-size: 0.92rem;
}

.org-mgmt-team-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.org-mgmt-team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.org-mgmt-team-table th,
.org-mgmt-team-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 160, 210, 0.15);
  vertical-align: middle;
}

.org-mgmt-team-table th {
  color: #9ab0c8;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.org-mgmt-team-table tbody tr:last-child td {
  border-bottom: none;
}

.org-mgmt-team-table select {
  max-width: 11rem;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid #2a3a53;
  background: #0b1118;
  color: #e9f0f8;
  font-family: inherit;
  font-size: 0.86rem;
}

.org-mgmt-team-actions {
  white-space: nowrap;
  text-align: right;
}

.org-mgmt-team-remove {
  font-size: 0.82rem;
}

.org-mgmt-role-readonly {
  font-weight: 500;
  color: #c6d4e4;
}

.org-mgmt-you-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b8e0ff;
  background: rgba(62, 142, 255, 0.12);
  border: 1px solid rgba(62, 142, 255, 0.28);
  border-radius: 4px;
  vertical-align: middle;
}

.org-mgmt-team-empty {
  margin: 8px 0 0;
  font-size: 0.88rem;
}
