/* Licence-specific content layout. Surfaces and controls come from ui.css. */
.licenses-page {
  min-width: 0;
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.license-card {
  overflow-wrap: anywhere;
}

.license-card h3 {
  margin: 12px 0;
}

.license-card h3 span {
  display: block;
  margin-top: 4px;
  color: var(--ui-accent);
  font-size: 12px;
}

.license-card p {
  margin: 12px 0;
}

.license-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
  font-size: 14px;
}

.license-card dt {
  color: var(--ui-muted);
}

.license-card dd {
  text-align: right;
}

.license-card details {
  padding: 16px 0;
  border-top: 1px solid var(--ui-line);
}

.license-card summary {
  cursor: pointer;
  font-weight: 600;
}

.license-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.license-catalog-card {
  display: flex;
  flex-direction: column;
}

.license-card .license-catalog-note {
  margin-top: auto;
  padding-top: 16px;
}

.license-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.license-feedback {
  color: var(--ui-red);
  margin-top: 12px;
}

.licenses-empty-note {
  margin: 0 0 16px;
  color: var(--ui-muted);
  font-size: 14px;
  line-height: 1.6;
}

.license-badge {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.license-inline-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ui-line);
}

.license-inline-form label {
  display: block;
  margin: 12px 0;
  font-size: 14px;
}

.license-inline-form .ui-field {
  margin-top: 8px;
}

.license-inline-form textarea {
  resize: vertical;
}

@media (max-width: 767px) {
  .license-grid {
    grid-template-columns: minmax(0,1fr);
  }

}

@media (max-width: 480px) {
  .license-card dl {
    grid-template-columns: minmax(0,1fr);
  }

  .license-card dd {
    text-align: left;
    margin-bottom: 8px;
  }

}

/* Admin Export: one allocation mode, then only the relevant commercial fields. */
.export-allocation {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.export-allocation [hidden] {
  display: none !important;
}

.export-allocation-step {
  min-width: 0;
  padding: 18px;
  border: 1px solid #42516d;
  border-radius: 16px;
  background: #101b2dcc;
}

.export-allocation-step h3 {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 750;
  color: #e2e8f0;
}

.export-allocation-step label {
  display: block;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
}

.export-allocation-step input:not([type=checkbox]):not([type=hidden]),.export-allocation-step select,.export-allocation-step textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #536581;
  border-radius: 10px;
  background: #1e293b;
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
}

.export-allocation-step textarea {
  resize: vertical;
}

.export-allocation-step p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: #a9b9ce;
}

.export-allocation-step button {
  padding: 11px 14px;
  border: 1px solid #536581;
  border-radius: 10px;
  background: #243957;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.export-allocation-step button:hover {
  background: #30496b;
}

.export-allocation-step .export-checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
}

.export-allocation-step .export-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #818cf8;
}

.export-allocation-step input:focus-visible,.export-allocation-step select:focus-visible,.export-allocation-step textarea:focus-visible,.export-allocation-step button:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.export-field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
}

.export-allocation-step .export-billing-options {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #42516d;
}

.export-billing-options summary {
  cursor: pointer;
  color: #b6c6dd;
  font-size: 12px;
}

.export-allocation-summary {
  border-color: #7661ba;
  background: linear-gradient(145deg,#292044,#101b2d);
}

.export-allocation-summary strong {
  display: block;
  color: #ddd6fe;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.export-allocation-step :disabled {
  opacity: .65;
  cursor: not-allowed;
}

html[data-theme=light] .export-allocation-step {
  background: #f6f8fc;
  border-color: #cbd5e1;
}

html[data-theme=light] .export-allocation-step h3,html[data-theme=light] .export-allocation-step label {
  color: #24334b;
}

html[data-theme=light] .export-allocation-step p,html[data-theme=light] .export-billing-options summary {
  color: #52627a;
}

html[data-theme=light] .export-allocation-summary {
  background: #f1edfc;
  border-color: #baace5;
}

html[data-theme=light] .export-allocation-summary strong {
  color: #57368a;
}
