/* Scoped to the license workspace: extend the shared ERP navy/turquoise theme. */
.panel.license-info-page { padding: var(--erp-space-6, 24px); }
#licenseInfoWorkspace {
  --license-muted-surface: color-mix(in srgb, var(--erp-surface, #fff) 94%, var(--ink, #1b3155));
  max-width: 1280px; margin: 0 auto; padding: 0;
  color: var(--ink, #1b3155); font-size: max(var(--erp-font-control, 12px), 13px); line-height: 1.5;
}
#licenseInfoWorkspace *, #licenseInfoWorkspace *::before, #licenseInfoWorkspace *::after { box-sizing: border-box; }
#licenseInfoWorkspace :is(h2, h3, h4, p, dl, dd, ul) { margin: 0; }
#licenseInfoWorkspace h2 { font-size: 24px; line-height: 1.25; letter-spacing: -.5px; }
#licenseInfoWorkspace h3 { font-size: 17px; line-height: 1.35; }
#licenseInfoWorkspace h4 { font-size: 14px; line-height: 1.4; }
#licenseInfoWorkspace :is(.license-info-muted, .license-info-footnote, small, dt) { color: var(--muted, #667177); }
#licenseInfoWorkspace small { font-size: 12px; }
#licenseInfoWorkspace .license-info-breadcrumb { margin-bottom: 14px; color: var(--muted, #667177); font-size: 12px; }
.license-info-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
#licenseInfoWorkspace .license-info-heading p { margin-top: 6px; }
.license-info-actions { display: grid; justify-items: end; gap: 7px; }
#licenseInfoWorkspace .license-info-actions button { min-height: 36px; padding: 8px 16px; font: inherit; font-weight: 700; border-radius: var(--erp-radius-md, 9px); }
#licenseInfoWorkspace .license-info-actions button:disabled { opacity: .6; cursor: default; }
#licenseInfoWorkspace :is(button, summary):focus-visible { outline: 3px solid var(--erp-accent, #079996); outline-offset: 3px; }
#licenseInfoWorkspace .license-info-status:not(:empty), #licenseInfoWorkspace .license-info-notice { padding: 12px 14px; margin-bottom: 16px; background: var(--license-muted-surface); border-radius: var(--erp-radius-md, 9px); border-left: 3px solid var(--erp-accent, #079996); overflow-wrap: anywhere; }
.license-info-status:empty { display: none; }
#licenseInfoWorkspace .license-info-status[data-tone="warning"] { border-left-color: var(--erp-warning, #9a610b); }
.license-info-content { display: grid; gap: 24px; }
#licenseInfoWorkspace .license-info-current { overflow: hidden; border: 1px solid var(--erp-border, #dce3e5); border-top: 3px solid var(--erp-accent, #079996); border-radius: var(--erp-radius-lg, 14px); background: var(--erp-surface, #fff); box-shadow: none; }
#licenseInfoWorkspace .license-info-current-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border: 0; background: transparent; }
.license-info-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.license-info-identity > div { min-width: 0; overflow-wrap: anywhere; }
.license-info-identity img { flex: 0 0 40px; object-fit: contain; }
#licenseInfoWorkspace .license-info-eyebrow { margin-bottom: 4px; color: var(--erp-accent, #079996); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
#licenseInfoWorkspace .license-info-identity .license-info-muted { margin-top: 4px; }
.license-info-badge { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; padding: 3px 9px; border-radius: 999px; color: var(--muted, #667177); background: var(--license-muted-surface); font-size: 11px; font-weight: 650; }
.license-info-badge.is-active { color: var(--erp-success, #147a5b); background: color-mix(in srgb, var(--erp-success, #147a5b) 9%, var(--erp-surface, #fff)); }
.license-info-badge.is-warning { color: var(--erp-warning, #9a610b); background: color-mix(in srgb, var(--erp-warning, #9a610b) 9%, var(--erp-surface, #fff)); }
.license-info-badge:is(.is-active, .is-warning)::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#licenseInfoWorkspace .license-info-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 20px; padding: 16px 0; border-top: 1px solid var(--erp-border, #dce3e5); border-bottom: 1px solid var(--erp-border, #dce3e5); }
.license-info-metric { min-width: 0; overflow-wrap: anywhere; }
.license-info-metrics .license-info-metric { padding: 0 18px; border-left: 1px solid var(--erp-border, #dce3e5); }
.license-info-metrics .license-info-metric:first-child { padding-left: 0; border-left: 0; }
.license-info-metric dt { font-size: 12px; }
#licenseInfoWorkspace .license-info-metric dd { margin-top: 5px; font-size: 20px; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; }
#licenseInfoWorkspace .license-info-metric small { display: block; margin-top: 4px; font-size: 11px; }
#licenseInfoWorkspace .erp-panel-body { padding: 20px; }
.license-info-rights { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr); gap: 24px; }
.license-info-rights > section { min-width: 0; }
.license-info-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#licenseInfoWorkspace .license-info-modules { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.license-info-modules li { max-width: 100%; padding: 5px 10px; border: 1px solid var(--erp-border, #dce3e5); border-radius: var(--erp-radius-sm, 6px); background: var(--license-muted-surface); overflow-wrap: anywhere; font-size: 12px; }
#licenseInfoWorkspace .license-info-footnote { font-size: 12px; }
#licenseInfoWorkspace .license-info-module-section .license-info-footnote { margin-top: 12px; }
.license-info-capacity { border-left: 1px solid var(--erp-border, #dce3e5); padding-left: 24px; }
#licenseInfoWorkspace .license-info-limits { margin-top: 10px; }
.license-info-limits > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 5px 0; font-size: 12px; }
.license-info-limits dt { overflow-wrap: anywhere; }
.license-info-limits dd { font-weight: 700; font-variant-numeric: tabular-nums; }
#licenseInfoWorkspace .license-info-customer > .license-info-section-heading { margin-bottom: 4px; }
#licenseInfoWorkspace .license-info-customer > .license-info-muted { margin-bottom: 14px; }
.license-info-license { margin-top: 8px; border: 1px solid var(--erp-border, #dce3e5); border-radius: var(--erp-radius-md, 9px); background: var(--erp-surface, #fff); }
.license-info-license > summary { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: inherit; list-style: none; cursor: pointer; }
.license-info-license > summary::-webkit-details-marker { display: none; }
.license-info-license > summary::after { content: ''; width: 8px; height: 8px; border: solid var(--muted, #667177); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); flex: 0 0 8px; margin: 0 2px 4px 0; }
.license-info-license[open] > summary::after { transform: rotate(225deg); margin-top: 6px; }
.license-info-license > summary:hover { background: var(--license-muted-surface); }
.license-info-license-name { display: grid; flex: 1; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.license-info-license-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 12px; }
.license-info-license-body { padding: 16px; border-top: 1px solid var(--erp-border, #dce3e5); }
#licenseInfoWorkspace .license-info-license-identity { display: flex; flex-wrap: wrap; gap: 16px 32px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--erp-border, #dce3e5); }
#licenseInfoWorkspace .license-info-license-identity dd { font-size: 12px; }
:root[data-theme="dark"] #licenseInfoWorkspace .license-info-badge.is-active { color: #8edcc4; }
:root[data-theme="dark"] #licenseInfoWorkspace .license-info-badge.is-warning { color: #f0c57c; }
@media (max-width: 1000px) {
  .license-info-license-meta { gap: 8px 14px; }
  .license-info-license > summary { flex-wrap: wrap; }
  .license-info-license-name { flex-basis: 50%; }
}
@media (max-width: 700px) {
  .panel.license-info-page { padding: 16px; }
  .license-info-actions { justify-items: start; }
  #licenseInfoWorkspace .license-info-current-header { padding: 16px; align-items: flex-start; flex-wrap: wrap; }
  #licenseInfoWorkspace .license-info-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 16px; gap: 20px 0; }
  .license-info-metrics .license-info-metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  #licenseInfoWorkspace .license-info-metric dd { font-size: 18px; }
  #licenseInfoWorkspace .erp-panel-body { padding: 16px; }
  .license-info-rights { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .license-info-capacity { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--erp-border, #dce3e5); }
  .license-info-license > summary { gap: 12px; }
  .license-info-license-name { flex-basis: calc(100% - 24px); }
  .license-info-license-meta { flex: 1; }
}

/* License identity card: authority metadata and installation support stay together. */
#licenseInfoWorkspace .license-info-current-header {
  background: linear-gradient(110deg, #1b3155, #263968 65%, #3c8589);
  padding: 20px 24px; color: #fff;
}
#licenseInfoWorkspace .license-info-current-header .license-info-muted { color: #dce8ef; }
#licenseInfoWorkspace .license-info-current-header .license-info-eyebrow { color: #93d9d7; }
#licenseInfoWorkspace .license-info-current-header .is-active { color: #d9fff0; background: #ffffff18; }
#licenseInfoWorkspace .license-info-current-header .is-warning { color: #ffe1a3; background: #ffffff18; }
.license-info-parties { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 18px 20px; }
.license-info-party { min-width: 0; overflow-wrap: anywhere; }
.license-info-dealer { padding-left: 24px; border-left: 1px solid var(--erp-border, #dce3e5); }
.license-info-party-name { display: block; margin-top: 6px; font-size: 14px; }
#licenseInfoWorkspace .license-info-contact-fields { margin-top: 8px; display: grid; gap: 4px; }
.license-info-contact-fields > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; font-size: 12px; }
.license-info-contact-fields dd { font-weight: 600; }
#licenseInfoWorkspace .license-info-dealer-empty { margin-top: 10px; font-size: 12px; }
.license-info-actions { grid-template-columns: auto auto; align-items: start; }
.license-info-actions small { grid-column: 1 / -1; }
#licenseInfoWorkspace .license-info-print-button { background: var(--erp-surface, #fff); color: var(--ink, #1b3155); border: 1px solid var(--erp-border, #dce3e5); cursor: pointer; }
@media (max-width: 700px) {
  .license-info-parties { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .license-info-dealer { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--erp-border, #dce3e5); }
  .license-info-contact-fields > div { grid-template-columns: 115px minmax(0, 1fr); }
}
body.license-info-print-shell { margin: 24px; background: #fff; color: #1b3155; font-family: Arial, sans-serif; }
.license-info-print-shell #licenseInfoWorkspace { --erp-surface: #fff; --ink: #1b3155; --muted: #667177; --erp-border: #dce3e5; --erp-accent: #4d999b; }
.license-info-print-footer { margin-top: 16px; font: 11px Arial, sans-serif; color: #667177; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body.license-info-print-shell { margin: 0; }
  .license-info-print-shell #licenseInfoWorkspace { font-size: 10pt; max-width: none; }
  .license-info-print-shell .license-info-content { gap: 14px; }
  .license-info-print-shell :is(.license-info-current-header, .license-info-modules li, .license-info-badge) { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .license-info-print-shell :is(.license-info-metric, .license-info-party, .license-info-limits > div, .license-info-license > summary) { break-inside: avoid; }
  .license-info-print-shell .license-info-parties { grid-template-columns: 1.4fr 1fr; }
  .license-info-print-shell .license-info-rights { grid-template-columns: 1.8fr 1fr; gap: 16px; }
  .license-info-print-shell .license-info-capacity { border-left: 1px solid #dce3e5; padding: 0 0 0 16px; border-top: 0; }
  .license-info-print-shell .license-info-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .license-info-print-shell .license-info-license > summary::after { display: none; }
  .license-info-print-shell .license-info-license-body { display: block; }
}

/* One installation card; modules align in equal columns on screen and A4. */
#licenseInfoWorkspace .license-info-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#licenseInfoWorkspace .license-info-modules li { display: flex; align-items: center; min-height: 38px; padding: 7px 10px; }
@media (max-width: 1100px) { #licenseInfoWorkspace .license-info-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { #licenseInfoWorkspace .license-info-modules { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .license-info-print-shell #licenseInfoWorkspace .license-info-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .license-info-print-shell #licenseInfoWorkspace .license-info-modules li { min-height: 30px; padding: 5px 7px; font-size: 10px; }
}
#licenseInfoWorkspace .license-info-current-header { padding: 16px 20px; }
#licenseInfoWorkspace .license-info-parties { padding: 10px 20px; }
#licenseInfoWorkspace .license-info-metrics { padding: 12px 0; }
#licenseInfoWorkspace .erp-panel-body { padding: 12px 20px; }
#licenseInfoWorkspace .license-info-modules { gap: 6px; }
#licenseInfoWorkspace .license-info-modules li { min-height: 30px; padding: 5px 8px; }
.license-info-actions { grid-template-columns: auto auto auto; }
.license-agreement-dialog { width: min(1000px,94vw); max-height: 90vh; padding: 20px; border: 1px solid var(--erp-border,#dce3e5); border-radius: 14px; background: var(--erp-surface,#fff); color: var(--ink,#1b3155); }
.license-agreement-dialog::backdrop { background: #14244588; }
.license-agreement-dialog header { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.license-agreement-dialog header h3 { flex: 1; margin: 0; font-size: 18px; }
.license-agreement-dialog .license-info-notice { background: var(--license-muted-surface,#edf5f5); padding: 12px; font-size: 13px; }
.license-agreement-body { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 55vh; overflow: auto; padding: 16px; border: 1px solid var(--erp-border,#dce3e5); border-radius: 8px; font: 13px/1.7 Arial,sans-serif; }
.license-agreement-dialog footer { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.license-agreement-dialog footer label { flex: 1; }
@media(max-width:700px) { .license-info-actions { grid-template-columns: auto auto; } .license-agreement-dialog footer { align-items: flex-start; flex-wrap: wrap; } }
