:root {
    --ink: #172033;
    --muted: #69758b;
    --line: #dfe5ee;
    --surface: #ffffff;
    --canvas: #f4f6f9;
    --navy: #101a2e;
    --navy-soft: #1a2740;
    --accent: #0b8f8c;
    --accent-dark: #08706e;
    --accent-soft: #e4f7f5;
    --blue-soft: #e9f2ff;
    --blue: #2366ad;
    --success: #18794e;
    --success-soft: #e6f6ee;
    --warning: #9a6500;
    --warning-soft: #fff3d6;
    --danger: #b42336;
    --danger-soft: #fdebed;
    --neutral-soft: #eef1f5;
    --shadow: 0 12px 35px rgba(19, 31, 53, .08);
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 24px 18px 18px;
    color: #f7fbff;
    background: linear-gradient(170deg, #101a2e 0%, #14243b 62%, #10353d 120%);
    box-shadow: 8px 0 30px rgba(9, 18, 33, .12);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #052f35;
    background: linear-gradient(145deg, #62ddd4, #9aeee0);
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(45, 206, 193, .2);
}
.brand strong, .brand small { display: block; }
.brand strong { color: inherit; letter-spacing: -.01em; }
.brand small { margin-top: 1px; color: #9eb0c9; font-size: .72rem; }
.nav-list { display: grid; gap: 5px; margin-top: 38px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #b9c5d7;
    font-size: .91rem;
    font-weight: 550;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-link span { width: 20px; color: #7f94af; text-align: center; font-size: 1rem; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.065); text-decoration: none; transform: translateX(2px); }
.nav-link.is-active { color: #fff; background: rgba(79, 214, 203, .14); box-shadow: inset 3px 0 #4fd6cb; }
.nav-link.is-active span { color: #64dfd5; }
.sidebar__footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-chip__avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #2b3d59; color: #8be7df; font-weight: 750; }
.user-chip strong, .user-chip small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { color: #eef4fb; font-size: .85rem; }
.user-chip small { color: #91a3bc; font-size: .72rem; }
.text-button { margin: 9px 0 0 44px; padding: 0; border: 0; color: #90a3bd; background: none; font-size: .78rem; cursor: pointer; }
.text-button:hover { color: #fff; text-decoration: underline; }

.app-content { grid-column: 2; min-width: 0; }
.mobile-header { display: none; }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 34px clamp(22px, 3vw, 48px) 64px; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-header h1 { margin: 0; color: #152039; font-size: clamp(1.6rem, 2.2vw, 2.15rem); line-height: 1.12; letter-spacing: -.035em; }
.page-header p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: .94rem; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 9px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent-dark); font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

.button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 5px 14px rgba(11, 143, 140, .17);
    font-weight: 700;
    font-size: .86rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { color: #fff; background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav-link:focus-visible { outline: 3px solid rgba(31, 169, 165, .3); outline-offset: 2px; }
.button--secondary { color: #34415a; background: #fff; border-color: #cfd7e4; box-shadow: none; }
.button--secondary:hover { color: #172033; background: #f8fafc; border-color: #aeb9c9; }
.button--danger { background: var(--danger); box-shadow: 0 5px 14px rgba(180, 35, 54, .14); }
.button--danger:hover { background: #912031; }
.button--warning { color: #593b00; background: #f5c85f; box-shadow: none; }
.button--warning:hover { color: #392600; background: #eeb842; }
.button--ghost-dark { color: #dce7f4; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); box-shadow: none; }
.button--ghost-dark:hover { color: #fff; background: rgba(255,255,255,.14); }
.button--small { min-height: 34px; padding: 7px 11px; font-size: .78rem; }
.button[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 28px; }
.stat-card { position: relative; overflow: hidden; min-height: 124px; padding: 21px; border: 1px solid #e1e6ee; border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 22px rgba(22, 34, 55, .045); }
.stat-card::after { content: ""; position: absolute; right: -22px; bottom: -30px; width: 85px; height: 85px; border-radius: 50%; background: var(--accent-soft); }
.stat-card--danger::after { background: var(--danger-soft); }
.stat-card--warning::after { background: var(--warning-soft); }
.stat-card--blue::after { background: var(--blue-soft); }
.stat-card__label { position: relative; z-index: 1; display: block; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.stat-card__value { position: relative; z-index: 1; display: block; margin-top: 12px; color: #131e34; font-size: 2rem; font-weight: 780; line-height: 1; letter-spacing: -.04em; }
.stat-card__hint { position: relative; z-index: 1; display: block; margin-top: 9px; color: #8390a4; font-size: .75rem; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px; border-bottom: 1px solid #e8ecf2; }
.card__header h2, .card__header h3 { margin: 0; color: #1a2740; font-size: 1.02rem; letter-spacing: -.015em; }
.card__header p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.card__body { padding: 22px; }
.card__body--flush { padding: 0; }
.card__footer { padding: 15px 21px; border-top: 1px solid #e8ecf2; background: #fbfcfd; border-radius: 0 0 var(--radius) var(--radius); }

.filters { display: grid; grid-template-columns: minmax(200px, 1.7fr) repeat(3, minmax(130px, .8fr)) auto; gap: 10px; align-items: end; padding: 17px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filters--compact { grid-template-columns: minmax(220px, 1fr) minmax(140px, .4fr) auto; }
.filter-actions { display: flex; gap: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field__label { display: block; margin-bottom: 6px; color: #34415a; font-size: .8rem; font-weight: 750; }
.field__hint { display: block; margin-top: 6px; color: #7d899b; font-size: .75rem; }
.input, .select, .textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cfd7e4;
    border-radius: 8px;
    color: #1b273d;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: #aeb9c9; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11,143,140,.11); outline: none; }
.input[disabled], .select[disabled], .textarea[disabled] { color: #737f91; background: #f0f3f7; cursor: not-allowed; }
.textarea { min-height: 105px; resize: vertical; }
.check-row { min-height: 42px; display: flex; align-items: center; gap: 9px; }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.check-row label { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 19px; border-top: 1px solid #e7ebf1; }

.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.table th { padding: 11px 15px; color: #667287; background: #f7f9fb; border-bottom: 1px solid #e2e7ef; font-size: .7rem; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.table td { padding: 14px 15px; border-bottom: 1px solid #edf0f4; color: #344158; font-size: .84rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfd; }
.table .cell-primary { color: #172238; font-weight: 700; }
.table .cell-muted { color: #788397; }
.table .cell-wrap { max-width: 360px; white-space: normal; }
.table__actions { display: flex; justify-content: flex-end; gap: 6px; }
.serial { color: #16233a; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .83rem; font-weight: 750; letter-spacing: .025em; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1.15; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { color: var(--success); background: var(--success-soft); }
.badge--danger { color: var(--danger); background: var(--danger-soft); }
.badge--warning { color: var(--warning); background: var(--warning-soft); }
.badge--info { color: var(--blue); background: var(--blue-soft); }
.badge--neutral { color: #626f82; background: var(--neutral-soft); }

.alert { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; margin-bottom: 18px; border: 1px solid; border-radius: 10px; font-size: .86rem; }
.alert--success { color: #115d3d; background: var(--success-soft); border-color: #b8e5cf; }
.alert--danger { color: #852033; background: var(--danger-soft); border-color: #f1c4cb; }
.alert__icon { width: 21px; height: 21px; display: grid; flex: 0 0 21px; place-items: center; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 900; }
.alert--success .alert__icon { background: var(--success); }
.alert--danger .alert__icon { background: var(--danger); }
.alert__list { margin: 5px 0 0; padding-left: 18px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-top: 1px solid #e8ecf2; }
.pagination__summary { color: var(--muted); font-size: .78rem; }
.pagination__links { display: flex; gap: 7px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 20px; align-items: start; }
.detail-stack { display: grid; gap: 20px; }
.definition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 18px; }
.definition-item dt { color: #778398; font-size: .71rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.definition-item dd { margin: 5px 0 0; color: #1d2940; font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
.definition-item--wide { grid-column: span 2; }
.metric-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0f4; font-size: .83rem; }
.metric-line:last-child { border-bottom: 0; }
.metric-line span { color: var(--muted); }
.metric-line strong { color: #253149; text-align: right; }
.action-stack { display: grid; gap: 12px; }
.action-box { padding: 15px; border: 1px solid #e0e6ee; border-radius: 10px; background: #fbfcfd; }
.action-box h3 { margin: 0 0 10px; font-size: .88rem; }
.action-box .field + .field { margin-top: 10px; }
.action-box .button { width: 100%; margin-top: 10px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-actions form { display: inline-flex; }

/* License detail */
.license-page, .license-layout, .license-main, .license-sidebar { min-width: 0; }
.license-page__header { align-items: flex-start; }
.license-page__header .page-header__actions { padding-top: 29px; }
.license-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    color: #647188;
    font-size: .79rem;
    font-weight: 700;
}
.license-back span { font-size: 1rem; transition: transform .15s ease; }
.license-back:hover { color: var(--accent-dark); text-decoration: none; }
.license-back:hover span { transform: translateX(-2px); }
.license-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-header h1.license-title { font-size: clamp(1.65rem, 2.25vw, 2.25rem); overflow-wrap: anywhere; }
.license-title-line .badge { flex: 0 0 auto; }

.license-overview { overflow: hidden; margin-bottom: 20px; border-color: #d9e4eb; }
.license-overview__hero { display: grid; grid-template-columns: minmax(245px, .78fr) minmax(0, 2.22fr); background: linear-gradient(125deg, #f7fcfc 0%, #fff 55%); }
.license-overview__identity { display: flex; align-items: center; gap: 15px; padding: 24px; border-right: 1px solid #e3ebef; }
.license-overview__identity .eyebrow { margin-bottom: 4px; }
.license-overview__identity h2 { margin: 0; color: #18243a; font-size: 1.13rem; letter-spacing: -.02em; }
.license-overview__identity p { margin: 6px 0 0; color: var(--muted); font-size: .78rem; }
.license-overview__identity p strong { color: #334158; }
.license-overview__icon {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 13px;
    color: #087c78;
    background: #dff6f3;
    box-shadow: inset 0 0 0 1px #c7ebe7;
    font-size: 1.25rem;
    font-weight: 800;
}
.license-overview__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.license-kpi { min-width: 0; padding: 22px; }
.license-kpi + .license-kpi { border-left: 1px solid #e9edf2; }
.license-kpi > span { display: block; color: #7a879a; font-size: .69rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.license-kpi > strong { display: block; margin-top: 8px; color: #1b2840; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.license-kpi > strong small { color: #8792a4; font-size: .72rem; font-weight: 700; }
.license-kpi > small { display: block; margin-top: 5px; color: #8792a4; font-size: .7rem; line-height: 1.35; }
.license-overview__details { padding: 21px 24px 23px; border-top: 1px solid #e6ebf0; }
.license-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; margin: 0; }
.license-meta-grid__wide { grid-column: 1 / -1; padding-top: 17px; border-top: 1px solid #edf0f4; }

.license-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 326px); gap: 20px; align-items: start; }
.license-main { display: grid; gap: 20px; }
.license-main > .card + .card { margin-top: 0; }
.license-section { min-width: 0; overflow: hidden; }
.license-section__heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-icon {
    width: 34px;
    height: 34px;
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    color: #087b77;
    background: #e3f6f4;
    font-size: .92rem;
    font-weight: 800;
}
.section-icon--blue { color: #2865a3; background: #e9f2ff; }
.section-icon--amber { color: #986300; background: #fff2d2; }
.section-icon--slate { color: #536177; background: #eef1f5; }
.license-table { width: 100%; }
.license-table--devices { min-width: 690px; }
.license-table--activations { min-width: 720px; table-layout: fixed; }
.license-table--activations th:nth-child(1) { width: 128px; }
.license-table--activations th:nth-child(2) { width: 220px; }
.license-table--activations th:nth-child(3) { width: 84px; }
.license-table--activations th:nth-child(4) { width: 82px; }
.license-table--activations th:nth-child(5) { width: 102px; }
.license-table--activations .serial { white-space: normal; overflow-wrap: anywhere; }
.license-table--renewals { min-width: 790px; }
.license-section .table-wrap { overscroll-behavior-x: contain; }
.license-empty { padding: 35px 22px; }
.empty-state__icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    color: #8190a4;
    background: #f0f3f7;
    font-size: .9rem;
}
.trace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.trace-grid h3 { margin: 0 0 15px; color: #26334a; font-size: .83rem; }
.trace-list { display: grid; }
.trace-item { position: relative; display: flex; gap: 11px; min-width: 0; padding: 0 0 18px; }
.trace-item:not(:last-child)::before { content: ""; position: absolute; top: 11px; bottom: -1px; left: 4px; width: 1px; background: #dfe5ed; }
.trace-item:last-child { padding-bottom: 0; }
.trace-item__dot { position: relative; z-index: 1; width: 9px; height: 9px; flex: 0 0 9px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #bce5e2; }
.trace-item__dot--blue { background: var(--blue); box-shadow: 0 0 0 2px #cbdcf0; }
.trace-item strong, .trace-item small { display: block; overflow-wrap: anywhere; }
.trace-item strong { color: #2c394f; font-size: .79rem; }
.trace-item small { margin-top: 3px; color: #7b8799; font-size: .71rem; }
.trace-empty { margin: 0; color: #7b8799; font-size: .8rem; }

.license-sidebar { position: sticky; top: 24px; }
.management-card { overflow: hidden; box-shadow: 0 15px 42px rgba(19, 31, 53, .1); }
.management-card .card__header { background: linear-gradient(145deg, #fff, #f8fbfc); }
.management-card .card__header .eyebrow { margin-bottom: 4px; }
.management-card__body { padding: 7px 0; }
.management-panel { border-bottom: 1px solid #e7ebf1; }
.management-panel:last-child { border-bottom: 0; }
.management-panel summary {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #26334a;
    cursor: pointer;
    list-style: none;
    transition: background .15s ease;
}
.management-panel summary::-webkit-details-marker { display: none; }
.management-panel summary:hover { background: #f8fafc; }
.management-panel summary:focus-visible { outline: 3px solid rgba(31, 169, 165, .25); outline-offset: -3px; }
.management-panel summary strong, .management-panel summary small { display: block; }
.management-panel summary strong { font-size: .82rem; }
.management-panel summary small { margin-top: 2px; color: #8590a1; font-size: .68rem; font-weight: 500; }
.management-panel__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #087b77; background: #e3f6f4; font-size: .9rem; font-weight: 800; }
.management-panel__icon--amber { color: #916000; background: #fff1d0; }
.management-panel__icon--danger { color: #ad2639; background: #fdebed; }
.management-panel__chevron { color: #8b97a7; font-size: 1rem; transition: transform .18s ease; }
.management-panel[open] .management-panel__chevron { transform: rotate(180deg); }
.management-panel[open] > summary { background: #f8fafc; }
.management-panel__content { padding: 5px 18px 19px; }
.compact-form { display: grid; gap: 12px; }
.compact-form__two { gap: 9px; }
.compact-form .field label { margin-bottom: 5px; font-size: .74rem; }
.compact-form .input, .compact-form .select { min-height: 40px; font-size: .81rem; }
.compact-form__submit { width: 100%; margin-top: 2px; }
.label-optional, .label-required { margin-left: 4px; color: #909bab; font-size: .64rem; font-weight: 650; }
.label-required { color: var(--danger); }
.lifecycle-list { display: grid; gap: 10px; }
.lifecycle-action { padding: 13px; border: 1px solid #e1e6ee; border-radius: 10px; background: #fbfcfd; }
.lifecycle-action > div > strong { display: block; color: #2a374d; font-size: .79rem; }
.lifecycle-action > div > p { margin: 4px 0 12px; color: #7c8799; font-size: .69rem; line-height: 1.4; }
.lifecycle-action--warning { border-color: #f1dfae; background: #fffdf7; }
.lifecycle-action--danger { border-color: #efc9ce; background: #fffafb; }

.empty-state { padding: 45px 22px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: #34415a; }
.code-json { max-width: 460px; max-height: 160px; overflow: auto; margin: 0; color: #36445c; font-family: Consolas, monospace; font-size: .72rem; white-space: pre-wrap; }

.license-activation { margin-bottom: 20px; border-color: #cfe7e5; scroll-margin-top: 24px; }
.license-activation .card__header { background: linear-gradient(135deg, #fff, #f1fbfa); }
.license-activation .card__header .eyebrow { margin-bottom: 5px; }
.license-activation__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) 38px minmax(250px, .7fr); gap: 17px; align-items: center; }
.license-activation__code { min-height: 132px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .78rem; overflow-wrap: anywhere; }
.license-activation__or { display: flex; align-items: center; justify-content: center; align-self: stretch; color: #8290a3; }
.license-activation__or::before, .license-activation__or::after { content: ""; width: 1px; flex: 1; background: #e1e7ee; }
.license-activation__or span { padding: 8px 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.license-activation__file .input { min-height: 48px; padding: 10px; }
.license-activation__file .input::file-selector-button { margin-right: 10px; padding: 7px 10px; border: 0; border-radius: 7px; color: #34415a; background: #e9eef4; font-weight: 700; cursor: pointer; }
.license-activation__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #e7ebf1; }
.license-activation__footer p { max-width: 700px; margin: 0; color: var(--muted); font-size: .78rem; }

.auth-page { min-height: 100vh; background: #0f1b30; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 78% 20%, rgba(37, 181, 171, .18), transparent 27%), radial-gradient(circle at 10% 88%, rgba(44, 94, 158, .16), transparent 31%); }
.login-panel { width: min(960px, 100%); min-height: 580px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: #fff; background: linear-gradient(145deg, #14253f, #102b39); }
.login-story::after { content: ""; position: absolute; right: -100px; bottom: -115px; width: 330px; height: 330px; border: 70px solid rgba(76, 218, 207, .11); border-radius: 50%; }
.login-story .brand { position: relative; z-index: 1; }
.login-copy { position: relative; z-index: 1; }
.login-copy h1 { max-width: 390px; margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.03; letter-spacing: -.045em; }
.login-copy p { max-width: 390px; margin: 20px 0 0; color: #b8c8da; font-size: .96rem; }
.trust-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #97afc6; font-size: .78rem; }
.trust-line span { width: 9px; height: 9px; border-radius: 50%; background: #50d7c9; box-shadow: 0 0 0 5px rgba(80,215,201,.1); }
.login-form-wrap { display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.login-form-wrap h2 { margin: 0; color: #172138; font-size: 1.7rem; letter-spacing: -.035em; }
.login-form-wrap > p { margin: 8px 0 28px; color: var(--muted); font-size: .9rem; }
.login-form .field + .field { margin-top: 17px; }
.login-form .button { width: 100%; margin-top: 23px; }
.login-note { margin-top: 22px; color: #8a95a6; font-size: .74rem; text-align: center; }

.client-page { min-height: 100vh; background: #f5f7fa; }
.client-header { color: #fff; background: var(--navy); box-shadow: 0 5px 20px rgba(16,26,46,.15); }
.client-header__inner { width: min(1240px, calc(100% - 40px)); min-height: 78px; display: flex; align-items: center; gap: 44px; margin: 0 auto; }
.brand--dark .brand__mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }
.client-nav { display: flex; align-self: stretch; gap: 7px; }
.client-nav a { display: flex; align-items: center; padding: 0 13px; color: #aebed1; border-bottom: 3px solid transparent; font-size: .86rem; font-weight: 700; }
.client-nav a:hover { color: #fff; text-decoration: none; }
.client-nav a.is-active { color: #fff; border-bottom-color: #51d6cc; }
.client-account { display: flex; align-items: center; gap: 14px; margin-left: auto; color: #c8d4e2; font-size: .82rem; }
.client-main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 65px; }
.client-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 25px; padding: 31px; margin-bottom: 22px; border-radius: 17px; color: #fff; background: linear-gradient(130deg, #143148, #10585b); box-shadow: 0 15px 35px rgba(16,55,70,.16); }
.client-hero::after { content: ""; position: absolute; right: -50px; top: -80px; width: 260px; height: 260px; border: 50px solid rgba(91,225,214,.1); border-radius: 50%; }
.client-hero h1 { position: relative; z-index: 1; margin: 0; font-size: 1.85rem; letter-spacing: -.035em; }
.client-hero p { position: relative; z-index: 1; max-width: 640px; margin: 9px 0 0; color: #c3dadd; }

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: var(--canvas); }
.error-card { width: min(520px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.error-card h1 { margin: 0; font-size: 1.8rem; }
.error-card p { margin: 13px 0 24px; color: var(--muted); }

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-actions { grid-column: 1 / -1; }
    .detail-grid { grid-template-columns: 1fr; }
    .license-layout { grid-template-columns: 1fr; }
    .license-sidebar { position: static; }
}

@media (max-width: 820px) {
    .app-shell { display: block; }
    .sidebar { transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .app-content { min-height: 100vh; }
    .mobile-header { position: sticky; top: 0; z-index: 20; min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; color: #fff; background: var(--navy); }
    .brand--compact .brand__mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; }
    .menu-button { padding: 8px 11px; color: #d9e4f1; border: 1px solid #41506a; border-radius: 8px; background: transparent; }
    .main-content { padding: 25px 18px 50px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .form-grid, .form-grid--three, .definition-grid { grid-template-columns: 1fr; }
    .definition-item--wide { grid-column: auto; }
    .login-panel { grid-template-columns: 1fr; }
    .login-story { min-height: 270px; padding: 34px; }
    .login-copy h1 { font-size: 2rem; }
    .trust-line { margin-top: 30px; }
    .login-form-wrap { padding: 38px 34px; }
    .client-header__inner { width: calc(100% - 28px); min-height: auto; flex-wrap: wrap; gap: 13px; padding: 14px 0; }
    .client-header .brand { margin-right: auto; }
    .client-nav { order: 3; width: 100%; min-height: 44px; }
    .client-nav a { flex: 1; justify-content: center; }
    .client-account > span { display: none; }
    .client-main { width: calc(100% - 28px); padding-top: 25px; }
    .license-activation__grid { grid-template-columns: 1fr; }
    .license-activation__or { min-height: 32px; align-self: auto; }
    .license-activation__or::before, .license-activation__or::after { width: auto; height: 1px; }
    .license-activation__or span { padding: 0 10px; }
    .license-activation__footer { align-items: stretch; flex-direction: column; }
    .license-page__header .page-header__actions { padding-top: 0; }
    .license-overview__hero { grid-template-columns: 1fr; }
    .license-overview__identity { border-right: 0; border-bottom: 1px solid #e3ebef; }
    .license-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .stats-grid, .filters { grid-template-columns: 1fr; }
    .stat-card { min-height: 108px; }
    .page-header__actions, .page-header__actions .button { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .card__header { align-items: flex-start; flex-direction: column; }
    .pagination { align-items: flex-start; flex-direction: column; }
    .login-story { display: none; }
    .login-form-wrap { padding: 34px 25px; }
    .auth-shell { padding: 15px; }
    .client-hero { padding: 25px 21px; }
    .license-back { margin-bottom: 14px; }
    .license-title-line { align-items: flex-start; flex-direction: column; gap: 9px; }
    .license-overview__identity { padding: 20px; }
    .license-overview__kpis { grid-template-columns: 1fr; }
    .license-kpi { padding: 15px 20px; }
    .license-kpi + .license-kpi { border-top: 1px solid #e9edf2; border-left: 0; }
    .license-kpi > strong { margin-top: 5px; }
    .license-overview__details { padding: 20px; }
    .license-meta-grid { grid-template-columns: 1fr; gap: 18px; }
    .license-section__header { align-items: stretch; }
    .license-section__header .button { width: 100%; }
    .trace-grid { grid-template-columns: 1fr; gap: 25px; }
    .management-panel summary { padding-inline: 15px; }
    .management-panel__content { padding-inline: 15px; }
}
