@import url('./icons.css');

/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM — CSS Custom Properties
   Alle Farben, Abstände, Schatten zentral definiert.
   Kein hardcodierter Hex-Wert außerhalb dieses Blocks.
═══════════════════════════════════════════════════════════ */
:root {
  /* Brand */
  --c-primary:         #2563eb;
  --c-primary-hover:   #1d4ed8;
  --c-primary-active:  #1e40af;
  --c-primary-subtle:  #eff6ff;
  --c-primary-border:  #bfdbfe;

  /* Neutrals — Light */
  --c-bg:              #f8fafc;
  --c-surface:         #ffffff;
  --c-surface-raised:  #ffffff;
  --c-border:          #e2e8f0;
  --c-border-strong:   #cbd5e1;

  /* Text */
  --c-text:            #0f172a;
  --c-text-secondary:  #475569;
  --c-text-muted:      #94a3b8;
  --c-text-placeholder:#b0bec5;

  /* Sidebar (stays dark in both themes) */
  --c-sidebar-bg:          #0f172a;
  --c-sidebar-border:      #1e293b;
  --c-sidebar-item:        #94a3b8;
  --c-sidebar-item-hover:  rgba(255,255,255,.08);
  --c-sidebar-item-active: #2563eb;
  --c-sidebar-text-hover:  #f1f5f9;
  --c-sidebar-text-active: #ffffff;

  /* Semantic — Success */
  --c-success-bg:      #f0fdf4;
  --c-success-text:    #166534;
  --c-success-border:  #bbf7d0;

  /* Semantic — Danger */
  --c-danger-bg:       #fff1f2;
  --c-danger-text:     #be123c;
  --c-danger-border:   #fecdd3;

  /* Semantic — Warning */
  --c-warning-bg:      #fffbeb;
  --c-warning-text:    #92400e;
  --c-warning-border:  #fde68a;

  /* Semantic — Info */
  --c-info-bg:         #eff6ff;
  --c-info-text:       #1d4ed8;
  --c-info-border:     #bfdbfe;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 2px 6px rgba(15,23,42,.07);
  --shadow-md: 0 8px 24px rgba(15,23,42,.09);
  --shadow-lg: 0 20px 60px rgba(15,23,42,.12);

  /* Border radius */
  --r-xs:  .25rem;
  --r-sm:  .375rem;
  --r-md:  .5rem;
  --r-lg:  .75rem;
  --r-xl:  1rem;
  --r-full:999px;

  /* Transitions */
  --t-fast:   100ms ease;
  --t-base:   160ms ease;
  --t-slow:   260ms ease;

  /* Layout */
  --sidebar-width: 224px;
  --topbar-height: 3.5rem;
}


/* ─── RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: Inter, "Segoe UI", system-ui, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


/* ─── UTILITY ───────────────────────────────────────────── */
.w-100  { width: 100% !important; }
.h-100  { height: 100% !important; }
.h-auto { height: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.full-width { grid-column: 1 / -1; }
.muted  { color: var(--c-text-muted); }
.display-desktop { display: block; }
.display-mobile  { display: none; }


/* ─── ALERTS ────────────────────────────────────────────── */
.text-danger { color: var(--c-danger-text); }

.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  margin-bottom: 1rem;
  padding: .875rem 1rem;
  font-size: .9rem;
}
.alert-danger  { background: var(--c-danger-bg);  border-color: var(--c-danger-border);  color: var(--c-danger-text); }
.alert-warning { background: var(--c-warning-bg); border-color: var(--c-warning-border); color: var(--c-warning-text); }
.alert-success { background: var(--c-success-bg); border-color: var(--c-success-border); color: var(--c-success-text); }

.valid.modified:not([type=checkbox]) { outline: 2px solid var(--c-success-text); outline-offset: 1px; }
.invalid { outline: 2px solid var(--c-danger-text); outline-offset: 1px; }
.validation-message { color: var(--c-danger-text); font-size: .82rem; margin-top: .25rem; }


/* ─── TYPOGRAPHY ────────────────────────────────────────── */
.title {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 0;
}
.title.title-secondary {
  padding: .3rem 0 0;
  color: var(--c-text-secondary);
}
.title-header-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--c-text);
}
.title-content-text {
  font-size: .95rem;
  color: var(--c-text-secondary);
}
.title-content-text-secondary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-secondary);
}


/* ─── LOGIN / PUBLIC SHELL ──────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(37,99,235,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(37,99,235,.05) 0%, transparent 55%),
    var(--c-bg);
}

.login-panel {
  width: min(100%, 420px);
  padding: 2.25rem 2rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 2rem;
}
.login-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--r-md);
  background: var(--c-primary);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  flex-shrink: 0;
}
.login-brand h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--c-text);
}
.login-brand p {
  margin: .15rem 0 0;
  color: var(--c-text-muted);
  font-size: .82rem;
}

.field {
  display: grid;
  gap: .4rem;
  margin-bottom: .9rem;
  color: var(--c-text-secondary);
  font-weight: 600;
  font-size: .85rem;
}
.field input,
.field .dxbl-text-edit { width: 100%; }

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .1rem 0 1rem;
  font-size: .85rem;
}
.login-row a,
.login-panel a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 500;
}
.login-row a:hover,
.login-panel a:hover { text-decoration: underline; }

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  margin: 1.1rem 0;
  font-size: .8rem;
  color: var(--c-text-muted);
}
.login-divider span { height: 1px; background: var(--c-border); }

.primary-login-button {
  width: 100%;
  border: 0;
  border-radius: var(--r-md);
  padding: .78rem 1rem;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: background var(--t-base);
  letter-spacing: -.01em;
}
.primary-login-button:hover  { background: var(--c-primary-hover); }
.primary-login-button:active { background: var(--c-primary-active); }


/* ─── ACTIONS & BUTTONS ─────────────────────────────────── */
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.35rem;
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: .6rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-base);
  letter-spacing: -.01em;
}
.primary-action:hover  { background: var(--c-primary-hover); }
.primary-action:active { background: var(--c-primary-active); }

.secondary-action,
.table-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: .88rem;
  transition: background var(--t-base), border-color var(--t-base);
  white-space: nowrap;
}
.secondary-action { padding: .6rem 1rem; }
.table-action     { padding: .38rem .65rem; font-size: .82rem; }
.secondary-action:hover,
.table-action:hover { background: var(--c-bg); border-color: var(--c-primary); color: var(--c-primary); }

.danger-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--c-danger-border);
  border-radius: var(--r-sm);
  background: var(--c-danger-bg);
  color: var(--c-danger-text);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 500;
  padding: .38rem .65rem;
  transition: background var(--t-base);
}
.danger-action:hover { background: #ffe4e6; }

.link-button {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--c-primary);
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 500;
  padding: 0;
}
.link-button:hover { text-decoration: underline; }

.button-link { text-decoration: none; }
.button-group { display: flex; gap: .65rem; }
.confirm-button { margin-top: .3rem; }


/* ─── PAGE STRUCTURE ────────────────────────────────────── */
.admin-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-header { margin-bottom: .25rem; }
.page-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--c-text);
}
.page-header p {
  margin: .3rem 0 0;
  color: var(--c-text-secondary);
  font-size: .9rem;
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}


/* ─── SURFACES / PANELS ─────────────────────────────────── */
.surface-panel,
.context-panel,
.success-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.surface-panel { padding: 1.25rem; }
.list-panel    { padding: .875rem; }

.panel-title {
  border-bottom: 1px solid var(--c-border);
  margin: -1.25rem -1.25rem 1.25rem;
  padding: 1rem 1.25rem;
}
.panel-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}
.panel-title p {
  margin: .2rem 0 0;
  color: var(--c-text-secondary);
  font-size: .85rem;
}

.context-panel { padding: 1.25rem; }
.context-panel h2 {
  margin: 0 0 .9rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
}
.context-panel dl { display: grid; gap: 0; margin: 0 0 1rem; }
.context-panel dl div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--c-border);
}
.context-panel dl div:last-child { border-bottom: none; }
.context-panel dt { color: var(--c-text); font-weight: 700; font-size: .85rem; }
.context-panel dd { color: var(--c-text-secondary); margin: 0; font-size: .85rem; text-align: right; }
.context-panel p  { color: var(--c-text-secondary); font-size: .88rem; margin: 0; }


/* ─── LIST TOOLBAR & SEARCH ─────────────────────────────── */
.list-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid var(--c-border);
  margin: -.875rem -.875rem .875rem;
  padding: .75rem .875rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: min(100%, 300px);
  height: 2.25rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
  background: var(--c-bg);
  color: var(--c-text-muted);
  padding: 0 .75rem;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.search-field:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  background: var(--c-surface);
}
.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: .88rem;
}
.search-field input::placeholder { color: var(--c-text-placeholder); }


/* ─── TABLES ─────────────────────────────────────────────── */
.responsive-table { overflow-x: auto; }
.responsive-table table { width: 100%; border-collapse: collapse; }
.responsive-table th,
.responsive-table td {
  border-bottom: 1px solid var(--c-border);
  padding: .8rem .75rem;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.responsive-table th {
  color: var(--c-text-muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--c-bg);
}
.responsive-table tr:last-child td { border-bottom: none; }
.responsive-table tr:hover td { background: var(--c-bg); }

.table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .4rem;
}

.table-input {
  width: 100%;
  min-height: 2rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  padding: .3rem .5rem;
  font: inherit;
  font-size: .88rem;
}

.entity-cell { display: grid; gap: .1rem; }
.entity-cell strong { color: var(--c-text); font-weight: 600; }
.entity-cell small  { color: var(--c-text-muted); font-size: .78rem; }


/* ─── FORMS ──────────────────────────────────────────────── */
.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid label {
  display: grid;
  gap: .4rem;
  color: var(--c-text-secondary);
  font-size: .85rem;
  font-weight: 600;
}

.text-input {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  padding: .48rem .7rem;
  font: inherit;
  font-size: .9rem;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.text-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
.textarea-input { min-height: 6rem; resize: vertical; }

.form-actions {
  display: flex;
  gap: .65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
}


/* ─── ENTITY HERO ────────────────────────────────────────── */
.entity-hero,
.license-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.entity-hero h1,
.license-detail-hero h1 {
  margin: .15rem 0 .5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--c-text);
}

.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}


/* ─── STATUS & PLAN BADGES ───────────────────────────────── */
.status-badge,
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  height: 1.5rem;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 0 .55rem;
}
.status-badge.active  { background: var(--c-success-bg);  color: var(--c-success-text);  border: 1px solid var(--c-success-border); }
.status-badge.revoked { background: var(--c-danger-bg);   color: var(--c-danger-text);   border: 1px solid var(--c-danger-border); }
.status-badge.expired { background: var(--c-warning-bg);  color: var(--c-warning-text);  border: 1px solid var(--c-warning-border); }
.status-badge.neutral { background: var(--c-bg);          color: var(--c-text-secondary); border: 1px solid var(--c-border-strong); }
.plan-badge           { background: var(--c-primary-subtle); color: var(--c-primary);     border: 1px solid var(--c-primary-border); }


/* ─── SUMMARY STRIPS ─────────────────────────────────────── */
.summary-strip {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}
.summary-strip div {
  min-width: 6.5rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: .7rem .9rem;
  text-align: right;
  background: var(--c-bg);
}
.summary-strip span { display: block; color: var(--c-text-muted); font-size: .72rem; }
.summary-strip strong {
  display: block;
  color: var(--c-text);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-top: .1rem;
}

.detail-summary {
  min-width: 160px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: .8rem .9rem;
  text-align: right;
  background: var(--c-bg);
}
.detail-summary span,
.detail-summary small { display: block; color: var(--c-text-muted); font-size: .75rem; }
.detail-summary strong {
  display: block;
  color: var(--c-text);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: .1rem 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}


/* ─── TAB BAR ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 1.25rem;
}
.tab-bar button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--c-text-secondary);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: .75rem 1rem;
  transition: color var(--t-base), border-color var(--t-base);
  margin-bottom: -1px;
}
.tab-bar button:hover { color: var(--c-text); }
.tab-bar button.active {
  border-bottom-color: var(--c-primary);
  color: var(--c-primary);
}


/* ─── SUCCESS PANEL ──────────────────────────────────────── */
.success-panel {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  max-width: 680px;
  border-color: var(--c-success-border);
  background: var(--c-success-bg);
}
.success-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-full);
  background: #dcfce7;
  color: var(--c-success-text);
  flex-shrink: 0;
}
.success-panel h2 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 700; color: var(--c-text); }
.success-panel p  { color: var(--c-text-secondary); margin: 0 0 .75rem; font-size: .9rem; }
.success-panel code {
  display: block;
  width: fit-content;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: .9rem;
  margin-bottom: 1rem;
  padding: .5rem .75rem;
}


/* ─── LICENSE KEY ─────────────────────────────────────────── */
.license-key-cell { display: grid; gap: .1rem; line-height: 1.3; }
.license-key-cell strong {
  color: var(--c-text);
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .88rem;
}
.license-key-cell small { color: var(--c-text-muted); font-size: .72rem; }

.license-list-key {
  color: var(--c-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  font-size: .88rem;
}
.license-key-input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
}


/* ─── SYSTEM INFO ─────────────────────────────────────────── */
.system-info-list { display: grid; gap: .85rem; margin: 0; }
.system-info-list div { display: grid; gap: .2rem; }
.system-info-list dt {
  color: var(--c-text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.system-info-list dd {
  color: var(--c-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .88rem;
  margin: 0;
  overflow-wrap: anywhere;
}


/* ─── AUDIT LOG ───────────────────────────────────────────── */
.audit-list.full article {
  grid-template-columns: 200px 1fr auto;
}


/* ─── IDENTITY MANAGE LAYOUT ─────────────────────────────── */
.manage-layout { display: flex; flex-direction: column; gap: .75rem; }
.manage-content { display: flex; flex-direction: column; gap: .75rem; }

.main-content {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}
.block-content {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 500px;
  width: 100%;
}

.info-message {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: .75rem 1rem;
  background: var(--c-info-bg);
  border: 1px solid var(--c-info-border);
  border-radius: var(--r-md);
  color: var(--c-info-text);
  font-size: .88rem;
}
.info-message.info-panel { margin-bottom: .75rem; }

.or {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .25rem 0;
}
.or .or-line { flex: 1; height: 1px; background: var(--c-border); }
.or .or-text { color: var(--c-text-muted); font-size: .8rem; }

.links-container {
  display: flex;
  align-items: center;
  gap: .35rem;
  justify-content: center;
  font-size: .85rem;
}
.links-container .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-text-muted);
}

.large-input {
  font-size: 1.75rem;
  height: 4rem;
  text-align: center;
  letter-spacing: .15em;
}


/* ─── APP CARD (Manage) ──────────────────────────────────── */
.app-card-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  padding: 0 1rem;
}
.app-card {
  width: 100%;
  max-width: 720px;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
}


/* ─── SHELL LAYOUT ────────────────────────────────────────── */
.license-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
}

.license-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-sidebar-bg);
  color: var(--c-sidebar-item);
  border-right: 1px solid rgba(255,255,255,.04);
  overflow-y: auto;
  z-index: 40;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem .75rem;
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .5rem .9rem;
  color: #f1f5f9;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: .25rem;
}
.brand:hover { color: #fff; text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--r-sm);
  background: var(--c-primary);
  font-weight: 800;
  font-size: .75rem;
  color: #fff;
  flex-shrink: 0;
}

.brand strong { display: block; font-size: .9rem; font-weight: 700; color: #f1f5f9; letter-spacing: -.01em; }
.brand small  { display: block; font-size: .7rem; color: rgba(255,255,255,.35); margin-top: .1rem; }

.license-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.license-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-xs);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
}

.account-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
  padding: .35rem .6rem;
  border-radius: var(--r-sm);
  transition: background var(--t-base);
}
.account-link:hover { background: var(--c-bg); }

.ghost-button {
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  border-radius: var(--r-sm);
  padding: .4rem .75rem;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base);
}
.ghost-button:hover { background: var(--c-bg); color: var(--c-text); }

/* Hamburger — nur mobil sichtbar */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--c-text-secondary);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}

/* Sidebar-Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 39;
  backdrop-filter: blur(2px);
}

.license-content {
  min-width: 0;
  padding: 1.5rem;
}

.public-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 10% 5%, rgba(37,99,235,.06) 0%, transparent 55%),
    var(--c-bg);
}

/* ─── NAV (in site.css als Fallback, primär in NavMenu.razor.css) */
.license-nav {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.license-nav a,
.license-nav a:visited {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.35rem;
  padding: .52rem .75rem;
  color: var(--c-sidebar-item);
  text-decoration: none;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--t-base), color var(--t-base);
}
.license-nav a:hover { background: var(--c-sidebar-item-hover); color: var(--c-sidebar-text-hover); }
.license-nav a.active { background: var(--c-sidebar-item-active); color: var(--c-sidebar-text-active); font-weight: 600; }
.license-nav span:first-child { width: 1rem; text-align: center; flex-shrink: 0; }


/* ─── DEVEXPRESS OVERRIDES ───────────────────────────────── */

/* Grid — ans eigene Design-System anpassen */
.dxbl-grid {
  border: none !important;
  font-size: .88rem;
}
.dxbl-grid .dxbl-grid-header-row th {
  background: var(--c-bg) !important;
  color: var(--c-text-muted) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--c-border) !important;
}
.dxbl-grid .dxbl-grid-data-row td {
  border-bottom: 1px solid var(--c-border) !important;
  color: var(--c-text);
  vertical-align: middle;
}
.dxbl-grid .dxbl-grid-data-row:hover td {
  background: var(--c-bg) !important;
}
.dxbl-grid .dxbl-grid-data-row:last-child td {
  border-bottom: none !important;
}
.grid-row-clickable { cursor: pointer; }

/* Grid Search Box */
.dxbl-grid .dxbl-grid-search-panel {
  padding: .6rem .875rem;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}
.dxbl-grid .dxbl-grid-search-panel .dxbl-text-edit {
  max-width: 320px;
}

/* Grid Pager */
.dxbl-grid .dxbl-pager {
  border-top: 1px solid var(--c-border) !important;
  background: var(--c-bg) !important;
  font-size: .82rem;
}

/* FormLayout — Abstände anpassen */
.form-layout-dx {
  margin-bottom: .5rem;
}
.dxbl-fl-item-caption {
  font-size: .82rem !important;
  font-weight: 600 !important;
  color: var(--c-text-secondary) !important;
  margin-bottom: .35rem !important;
}

/* DxTextBox / DxComboBox / DxDateEdit — Input-Look */
.dxbl-text-edit,
.dxbl-combo-box,
.dxbl-date-edit {
  border-color: var(--c-border-strong) !important;
  border-radius: var(--r-sm) !important;
  font-size: .9rem !important;
  transition: border-color var(--t-base), box-shadow var(--t-base) !important;
}
.dxbl-text-edit:focus-within,
.dxbl-combo-box:focus-within,
.dxbl-date-edit:focus-within {
  border-color: var(--c-primary) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

/* DxButton — Primary */
.dxbl-btn-primary {
  background: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
  font-weight: 700 !important;
  border-radius: var(--r-md) !important;
  transition: background var(--t-base) !important;
}
.dxbl-btn-primary:hover {
  background: var(--c-primary-hover) !important;
  border-color: var(--c-primary-hover) !important;
}

/* DxButton — Secondary/Outline */
.dxbl-btn-secondary {
  border-color: var(--c-border-strong) !important;
  color: var(--c-text) !important;
  border-radius: var(--r-md) !important;
  font-weight: 500 !important;
  transition: background var(--t-base) !important;
}
.dxbl-btn-secondary:hover {
  background: var(--c-bg) !important;
}

/* DxTabs */
.dxbl-tabs .dxbl-tab-item > a {
  color: var(--c-text-secondary) !important;
  font-weight: 600 !important;
  font-size: .9rem !important;
  border-bottom: 2px solid transparent !important;
  padding: .75rem 1rem !important;
  transition: color var(--t-base) !important;
}
.dxbl-tabs .dxbl-tab-item > a:hover {
  color: var(--c-text) !important;
}
.dxbl-tabs .dxbl-tab-item.dxbl-active > a {
  color: var(--c-primary) !important;
  border-bottom-color: var(--c-primary) !important;
}
.dxbl-tabs {
  border-bottom: 1px solid var(--c-border) !important;
  margin-bottom: 1.25rem !important;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 920px) {
  .create-layout,
  .form-grid,
  .detail-layout { grid-template-columns: 1fr; }

  .page-header-row { align-items: flex-start; flex-direction: column; }

  .entity-hero,
  .license-detail-hero { align-items: flex-start; flex-direction: column; }

  .detail-summary,
  .summary-strip { width: 100%; }
  .summary-strip { overflow-x: auto; }
}

@media (max-width: 768px) {
  .display-desktop { display: none; }
  .display-mobile  { display: block; }
}

@media (max-width: 860px) {
  /* Sidebar wird zum Overlay */
  .license-shell {
    grid-template-columns: 1fr;
  }

  .license-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    box-shadow: none;
  }

  .license-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay.open { display: block; }

  .hamburger { display: flex; }

  .license-topbar { padding: 0 1rem; }
  .license-content { padding: 1rem; }
}
