.licensing-content {
    padding: 28px 30px 40px;
    min-width: 0;
}

.licensing-shell {
    width: min(100%, 1500px);
    margin: 0 auto;
}

.licensing-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    margin-bottom: 22px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(59, 130, 246, .16), transparent 35%),
        radial-gradient(circle at 92% 90%, rgba(16, 185, 129, .11), transparent 30%),
        var(--surface, #fff);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.licensing-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -70px;
    top: -90px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 36px solid rgba(59, 130, 246, .06);
    pointer-events: none;
}

.licensing-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.licensing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 11px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .1);
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}

.licensing-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(23px, 3vw, 34px);
    line-height: 1.25;
    color: var(--text-primary, #0f172a);
}

.licensing-hero p {
    margin: 0;
    max-width: 650px;
    color: var(--text-secondary, #64748b);
    line-height: 1.8;
}

.licensing-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.licensing-btn {
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.licensing-btn:hover {
    transform: translateY(-1px);
}

.licensing-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.licensing-btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

.licensing-btn-secondary {
    background: #eef2ff;
    color: #3730a3;
}

.licensing-btn-ghost {
    background: #f1f5f9;
    color: #334155;
}

.licensing-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.licensing-kpi {
    position: relative;
    overflow: hidden;
    padding: 19px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    text-align: right;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.licensing-kpi:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.licensing-kpi.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.licensing-kpi-label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.licensing-kpi-value {
    display: block;
    color: #0f172a;
    font-size: 29px;
    font-weight: 900;
    line-height: 1;
}

.licensing-kpi-note {
    display: block;
    margin-top: 9px;
    color: #94a3b8;
    font-size: 11px;
}

.licensing-panel {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.licensing-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
}

.licensing-panel-title h2 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
}

.licensing-panel-title p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

.licensing-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.licensing-search {
    min-width: 250px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #dbe3ed;
    border-radius: 11px;
    outline: none;
    font: inherit;
    background: #fff;
}

.licensing-search:focus,
.licensing-select:focus,
.licensing-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.licensing-select,
.licensing-input {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #dbe3ed;
    border-radius: 11px;
    background: #fff;
    outline: none;
    font: inherit;
}

.licensing-table-wrap {
    overflow-x: auto;
}

.licensing-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
}

.licensing-table th,
.licensing-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    vertical-align: middle;
}

.licensing-table th {
    color: #64748b;
    background: #fafcff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.licensing-table td {
    color: #334155;
    font-size: 13px;
}

.licensing-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.licensing-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #e0e7ff);
    color: #1d4ed8;
    font-weight: 900;
}

.licensing-user strong {
    display: block;
    margin-bottom: 2px;
    color: #0f172a;
}

.licensing-user small {
    color: #94a3b8;
}

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.license-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.license-status-active {
    color: #047857;
    background: #ecfdf5;
}

.license-status-warning {
    color: #b45309;
    background: #fffbeb;
}

.license-status-critical {
    color: #c2410c;
    background: #fff7ed;
}

.license-status-expired,
.license-status-revoked {
    color: #b91c1c;
    background: #fef2f2;
}

.license-status-missing {
    color: #475569;
    background: #f1f5f9;
}

.license-status-exempt {
    color: #4338ca;
    background: #eef2ff;
}

.licensing-days {
    font-weight: 800;
}

.licensing-days.critical {
    color: #dc2626;
}

.licensing-days.warning {
    color: #d97706;
}

.licensing-empty,
.licensing-loading,
.licensing-error {
    padding: 36px 20px;
    text-align: center;
    color: #64748b;
}

.licensing-error {
    color: #b91c1c;
}

.licensing-key-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 20px 22px;
}

.licensing-key-card {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fbfdff;
}

.licensing-key-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.licensing-key-card span {
    color: #64748b;
    font-size: 12px;
}

.licensing-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(6px);
}

.licensing-modal[hidden] {
    display: none !important;
}

.licensing-modal-card {
    width: min(100%, 540px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
}

.licensing-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid #eef2f7;
}

.licensing-modal-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
}

.licensing-modal-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
}

.licensing-modal-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    font-size: 20px;
}

.licensing-modal-body {
    padding: 22px;
}

.licensing-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.licensing-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.licensing-field .licensing-input,
.licensing-field .licensing-select {
    width: 100%;
}

.licensing-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}

.generated-key-box {
    padding: 16px;
    margin-top: 16px;
    border: 1px dashed #93c5fd;
    border-radius: 15px;
    background: #eff6ff;
}

.generated-key-box[hidden] {
    display: none;
}

.generated-key-warning {
    margin: 0 0 11px;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.generated-key-value {
    direction: ltr;
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    word-break: break-all;
}

.licensing-inline-message {
    display: none;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.licensing-inline-message.show {
    display: block;
}

.licensing-inline-message.error {
    color: #991b1b;
    background: #fef2f2;
}

.licensing-inline-message.success {
    color: #065f46;
    background: #ecfdf5;
}

.licensing-access-denied {
    padding: 55px 20px;
    text-align: center;
}

.licensing-access-denied h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.licensing-access-denied p {
    margin: 0;
    color: #64748b;
}

@media (max-width: 1100px) {
    .licensing-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .licensing-key-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .licensing-content {
        padding: 18px 14px 30px;
    }

    .licensing-hero,
    .licensing-panel-head {
        flex-direction: column;
    }

    .licensing-actions,
    .licensing-toolbar {
        width: 100%;
    }

    .licensing-actions .licensing-btn {
        flex: 1;
    }

    .licensing-search,
    .licensing-select {
        width: 100%;
        min-width: 0;
    }

    .licensing-kpis,
    .licensing-key-grid {
        grid-template-columns: 1fr;
    }
}