/*
  You can add custom CSS rules or import files here.
*/

/* Import the Radzen CSS files */
@import './styles-generated.css';

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f0f4f8 0%, #dce8f5 50%, #eef2ff 100%);
  padding: 1.5rem;
}

.login-card-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-card {
  padding: 2rem 2rem 1.75rem;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.login-page .login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-page .login-icon {
  font-size: 2.25rem;
  color: var(--rz-primary, #007bff);
  margin-bottom: 0.75rem;
}

.login-page .login-title {
  margin: 0;
  font-weight: 600;
}

.login-page .login-subtitle {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.login-page .login-form-field {
  margin-bottom: 1.25rem;
}

.login-page .login-form-field .rz-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.login-page .login-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
}

.my-licenses-page,
.licenses-page {
  max-width: 100%;
}

.licenses-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.licenses-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: #64748b;
}

.licenses-summary-item strong {
  color: #334155;
}

.licenses-summary-active strong {
  color: #15803d;
}

.licenses-summary-warn strong {
  color: #b45309;
}

.licenses-grid-card {
  padding: 0.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.licenses-grid-card .licenses-data-grid {
  border: none;
}

.license-part-no-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1151f3;
}

.text-muted {
  color: #94a3b8;
}

/* Expanded row detail panel */
.license-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 2px solid #1151f3;
}

.license-detail-keybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.license-detail-keybar-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.license-detail-keybar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
}

.license-detail-keybar-label .rzi {
  font-size: 0.95rem;
}

.license-detail-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f1f5f9;
  word-break: break-all;
}

.license-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1.5rem;
}

.license-detail-fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.license-breakdown {
  padding: 0.9rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.license-breakdown-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.license-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1.25rem;
}

.license-breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.license-module-cell {
  line-height: 1.35;
}

.license-module-label {
  font-weight: 500;
  color: #334155;
}

.license-module-code {
  font-size: 0.8rem;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.license-family-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1151f3;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-bottom: 0.2rem;
  width: fit-content;
}

.license-detail-note {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #1151f3;
  border-radius: 8px;
}

.license-detail-note-text {
  margin: 0.35rem 0 0;
  color: #475569;
  line-height: 1.55;
  white-space: pre-wrap;
}

.training-title-cell {
  font-weight: 600;
  color: #1e293b;
}

.training-evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.training-evidence-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.training-evidence-preview {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.training-evidence-pdf-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #1e40af;
  font-size: 0.9rem;
}

.training-evidence-pdf-hint .rzi {
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .license-detail-keybar {
    flex-direction: column;
    align-items: stretch;
  }
}

.my-licenses-subtitle,
.licenses-page-subtitle {
  color: #64748b;
  margin: 0.35rem 0 1.5rem;
}

.licenses-loading {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.license-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.license-card-v2 {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.license-card-v2-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.license-card-v2-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}

.license-part-no {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1151f3;
  background: rgba(17, 81, 243, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-top: 0.25rem;
}

.license-account-tag {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: #64748b;
}

.license-status-badge {
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.license-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.license-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.license-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.license-info-value {
  font-size: 0.95rem;
  color: #334155;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.license-key-details {
  margin-top: 0.85rem;
  font-size: 0.85rem;
}

.license-key-details summary {
  cursor: pointer;
  color: #64748b;
  user-select: none;
}

.license-key-details summary:hover {
  color: #1151f3;
}

.license-key-code {
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  word-break: break-all;
  color: #475569;
}

.license-description {
  margin-top: 0.85rem;
}

.license-description p {
  margin: 0.35rem 0 0;
  color: #475569;
  line-height: 1.55;
  white-space: pre-wrap;
}

.portal-assign-card {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.product-pick-option {
  line-height: 1.35;
  padding: 0.15rem 0;
}

.product-pick-title {
  font-weight: 600;
  color: #0f172a;
}

.product-pick-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.2rem;
}

.product-pick-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.product-pick-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.25rem;
  white-space: normal;
  word-break: break-word;
}

.product-pick-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

.product-pick-summary-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.form-dialog-body {
  max-width: 100%;
}

.form-dialog-body .rz-fieldset {
  margin-bottom: 1rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.form-field-span-2 {
  grid-column: 1 / -1;
}

.form-field .rz-label {
  font-weight: 500;
}

.field-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.3;
}

.form-inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.form-dialog-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.schema-segments-grid {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 900px) {
  .form-grid-2,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }

  .form-field-span-2 {
    grid-column: auto;
  }
}

@media (min-width: 901px) {
  .rz-dialog-content:has(.form-dialog-body) {
    min-width: min(920px, 92vw);
  }
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 10px;
}

.portal-assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.portal-assign-field .rz-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.portal-assign-action {
  padding-bottom: 2px;
}

.portal-assign-grid-multi {
  grid-template-columns: 1fr 2fr auto;
}

.portal-assign-field-wide {
  min-width: 280px;
}

.license-select-option {
  line-height: 1.35;
  padding: 0.15rem 0;
}

.license-select-details {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.15rem;
  white-space: normal;
}

.portal-license-list {
  margin-top: 0.5rem;
}

.portal-license-card .license-card-v2-top {
  margin-bottom: 0.75rem;
}

.portal-license-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .portal-assign-grid {
    grid-template-columns: 1fr;
  }

  .license-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Legacy license card styles (kept for compatibility) */
.my-licenses-page {
  max-width: 900px;
}

.my-licenses-subtitle {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.license-card {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.license-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.license-product-name {
  margin: 0 0 0.35rem;
}

.license-product-cell {
  line-height: 1.35;
}

.license-product-cell .license-product-name {
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.license-product-description {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.license-product-partno {
  margin-top: 0.15rem;
}

.license-breakdown-item .license-module-code {
  font-weight: 400;
}

.license-key {
  font-family: monospace;
  font-size: 0.85rem;
  color: #64748b;
  word-break: break-all;
}

.license-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #475569;
}

.license-details .rz-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.rz-layout {
  width: 100%;
}

.rz-layout .rz-header {
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}

.rz-layout .rz-header > .rz-stack {
  width: 100%;
}

.rz-layout .rz-sidebar {
  overflow-x: hidden;
}

.rz-layout .rz-body {
  min-width: 0;
  box-sizing: border-box;
}

.layout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.75rem;
}

.layout-header-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.layout-header-profile {
  flex: 0 0 auto;
  margin-left: auto;
}

.layout-header-profile ul.rz-profile-menu {
  border-left: none;
  padding: 0.375rem 0.25rem;
}

.layout-header-profile ul.rz-profile-menu .rz-navigation-menu {
  right: 0;
  left: auto;
  min-width: 11rem;
}
