:root {
    --bg: #07111f;
    --bg-2: #0d1b2a;
    --panel: #132238;
    --panel-2: #101c30;
    --border: #243b55;
    --cyan: #25c2f5;
    --blue: #3b82f6;
    --orange: #ff9f43;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --text: #f5f7fa;
    --muted: #a7b3c6;
    --soft: rgba(255, 255, 255, 0.06);
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(circle at top left, rgba(37, 194, 245, 0.16), transparent 32%),
        linear-gradient(135deg, #06101d 0%, #091526 44%, #120f17 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

select, textarea {
    font: inherit;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-shell {
    width: min(100%, 520px);
}

.login-panel {
    padding: 34px;
    border: 1px solid rgba(73, 103, 135, 0.58);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(19, 34, 56, 0.96), rgba(7, 17, 31, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.brand-lockup, .portal-brand, .secure-strip, .form-row, .topbar, .top-actions, .admin-profile {
    display: flex;
    align-items: center;
}

.brand-lockup {
    gap: 16px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: white;
    font-weight: 800;
    font-size: 28px;
    background: linear-gradient(145deg, var(--cyan), var(--blue) 52%, var(--orange));
    box-shadow: 0 18px 45px rgba(37, 194, 245, 0.25);
}

.brand-lockup h1 {
    margin: 0;
    font-size: 30px;
}

.brand-lockup p, .page-head p, .crumb, .metric-card span, .panel-title span, .login-footer {
    color: var(--muted);
}

.secure-strip {
    justify-content: space-between;
    gap: 10px;
    margin: 26px 0;
    padding: 12px 14px;
    border: 1px solid rgba(36, 59, 85, 0.8);
    border-radius: 14px;
    background: rgba(13, 27, 42, 0.78);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.62);
}

.api-status {
    margin-left: auto;
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0a1625;
    color: var(--text);
    outline: none;
}

.auth-form input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(37, 194, 245, 0.11);
}

.password-row {
    display: grid;
    grid-template-columns: 1fr 64px;
    gap: 10px;
}

.ghost-button {
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--cyan);
    background: #0d1b2a;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.form-row {
    justify-content: space-between;
    margin: 4px 0 10px;
}

.check-line {
    gap: 8px;
    text-transform: none !important;
}

.check-line input {
    width: auto;
    min-height: auto;
}

.muted-link {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.primary-action {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    cursor: pointer;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 38px rgba(59, 130, 246, 0.3);
}

.primary-action.link-action {
    display: grid;
    place-items: center;
    margin-top: 22px;
}

.validation-summary, .field-error, .status-message {
    color: #ffb4b4;
    font-size: 13px;
}

.login-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    font-size: 12px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    padding: 26px 18px;
    border-right: 1px solid rgba(36, 59, 85, 0.7);
    background: rgba(7, 17, 31, 0.9);
}

.portal-brand {
    gap: 14px;
    padding: 8px 10px 26px;
}

.portal-brand strong, .portal-brand small {
    display: block;
}

.portal-brand small {
    color: var(--muted);
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
}

.side-nav a:hover, .side-nav a.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(37, 194, 245, 0.16), rgba(59, 130, 246, 0.07));
    box-shadow: inset 3px 0 0 var(--cyan);
}

.workspace {
    min-width: 0;
}

.topbar {
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(36, 59, 85, 0.7);
    background: rgba(13, 27, 42, 0.7);
    backdrop-filter: blur(16px);
}

.topbar strong {
    display: block;
    font-size: 18px;
}

.top-actions {
    gap: 12px;
}

.search-shell, .api-chip, .admin-profile, .logout-link, .version-pill {
    border: 1px solid rgba(36, 59, 85, 0.8);
    border-radius: 14px;
    background: rgba(19, 34, 56, 0.72);
}

.search-shell {
    min-width: 260px;
    padding: 11px 14px;
    color: var(--muted);
    font-size: 13px;
}

.api-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
}

.admin-profile {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
}

.admin-profile small {
    color: var(--cyan);
}

.logout-link {
    padding: 10px 13px;
    color: var(--orange);
    font-weight: 800;
}

.content {
    padding: 28px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--cyan) !important;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.page-head h1 {
    margin: 0;
    font-size: 34px;
}

.version-pill {
    align-self: flex-start;
    padding: 13px 16px;
}

.version-pill span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card, .panel, .notice {
    border: 1px solid rgba(36, 59, 85, 0.78);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(19, 34, 56, 0.94), rgba(13, 27, 42, 0.88));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

.metric-card {
    padding: 18px;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
}

.tone-green strong { color: var(--green); }
.tone-red strong { color: var(--red); }
.tone-amber strong { color: var(--amber); }
.tone-cyan strong { color: var(--cyan); }
.tone-blue strong { color: var(--blue); }

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.content-grid.wide {
    align-items: start;
}

.panel {
    padding: 20px;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-title h2 {
    margin: 0;
    font-size: 18px;
}

.mini-chart {
    display: flex;
    align-items: end;
    gap: 8px;
    min-height: 120px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(7, 17, 31, 0.58);
}

.bar {
    width: 18px;
    min-height: 4px;
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
}

.notice.warning {
    color: var(--amber);
}

.toolbar-form {
    display: flex;
    gap: 10px;
    align-self: flex-start;
}

.toolbar-form input,
.toolbar-form select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.action-panel input,
.action-panel select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(7, 17, 31, 0.82);
    color: var(--text);
    outline: none;
}

.toolbar-form input,
.toolbar-form select {
    min-width: 280px;
    min-height: 42px;
    padding: 0 14px;
}

.toolbar-form button,
.primary-action.compact,
.action-panel button {
    border: 0;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    cursor: pointer;
    font-weight: 800;
}

.toolbar-form button {
    min-height: 42px;
    padding: 0 18px;
}

.primary-action.compact {
    width: auto;
    min-height: 44px;
    padding: 0 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.form-grid label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.form-grid input,
.form-grid select {
    min-height: 42px;
    padding: 0 12px;
}

.date-time-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 10px;
}

.date-time-picker input {
    cursor: pointer;
}

.date-time-picker input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
    opacity: 0.76;
}

.form-grid textarea {
    padding: 12px;
    resize: vertical;
}

.table-shell {
    overflow: auto;
    border: 1px solid rgba(36, 59, 85, 0.68);
    border-radius: 14px;
    background: rgba(7, 17, 31, 0.56);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(36, 59, 85, 0.54);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(13, 27, 42, 0.92);
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 3px;
    color: var(--muted);
}

td code {
    color: var(--cyan);
    font-family: Consolas, "Cascadia Mono", monospace;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(167, 179, 198, 0.26);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 900;
}

.badge.green,
.badge.active,
.badge.information {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.36);
    background: rgba(34, 197, 94, 0.08);
}

.badge.red,
.badge.expired,
.badge.revoked,
.badge.cancelled,
.badge.danger,
.badge.critical {
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.36);
    background: rgba(239, 68, 68, 0.08);
}

.badge.warning,
.badge.suspended,
.badge.pending {
    color: var(--amber);
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(245, 158, 11, 0.08);
}

.badge.cyan {
    color: var(--cyan);
    border-color: rgba(37, 194, 245, 0.36);
    background: rgba(37, 194, 245, 0.08);
}

.badge.inactive,
.badge.scheduled,
.badge.locked {
    color: var(--orange);
    border-color: rgba(255, 159, 67, 0.36);
    background: rgba(255, 159, 67, 0.08);
}

.badge.deleted {
    color: #c4b5fd;
    border-color: rgba(196, 181, 253, 0.34);
    background: rgba(196, 181, 253, 0.08);
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(7, 17, 31, 0.62);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.inline-check input {
    width: auto;
}

.compact-metrics {
    margin-bottom: 18px;
}

.identity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(37, 194, 245, 0.34);
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(37, 194, 245, 0.1);
    font-size: 13px;
    font-weight: 900;
}

.management-table {
    min-width: 1160px;
}

.action-menu {
    position: relative;
}

.action-menu summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(37, 194, 245, 0.34);
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(37, 194, 245, 0.08);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    list-style: none;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-panel {
    position: absolute;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 10px;
    width: 360px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid rgba(36, 59, 85, 0.9);
    border-radius: 16px;
    background: #081423;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.action-panel form {
    display: grid;
    gap: 8px;
}

.action-panel input,
.action-panel select {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
}

.action-panel button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 11px;
    font-weight: 900;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.danger-form {
    padding-top: 10px;
    border-top: 1px solid rgba(239, 68, 68, 0.22);
}

.danger-form button {
    background: linear-gradient(135deg, #991b1b, var(--red));
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.plan-card {
    padding: 16px;
    border: 1px solid rgba(36, 59, 85, 0.78);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(19, 34, 56, 0.92), rgba(13, 27, 42, 0.82));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.plan-card span,
.plan-card small {
    display: block;
    color: var(--muted);
}

.plan-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 18px;
}

.plan-card.tone-cyan strong { color: var(--cyan); }
.plan-card.tone-blue strong { color: var(--blue); }
.plan-card.tone-orange strong { color: var(--orange); }
.plan-card.tone-violet strong { color: #a78bfa; }
.plan-card.tone-indigo strong { color: #818cf8; }
.plan-card.tone-emerald strong { color: #34d399; }
.plan-card.tone-gold strong { color: #facc15; }
.plan-card.tone-amber strong { color: var(--amber); }

.preview-stack {
    display: grid;
    gap: 12px;
}

.preview-stack > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid rgba(36, 59, 85, 0.68);
    border-radius: 14px;
    background: rgba(7, 17, 31, 0.56);
}

.preview-stack span {
    color: var(--muted);
}

.preview-stack strong {
    color: var(--cyan);
    text-align: right;
}

@media (max-width: 1080px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .topbar, .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        flex-wrap: wrap;
    }

    .metric-grid, .content-grid, .plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .metric-grid, .content-grid, .plan-grid {
        grid-template-columns: 1fr;
    }

    .search-shell {
        min-width: 0;
    }

    .toolbar-form,
    .form-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        width: 100%;
    }

    .toolbar-form input {
        min-width: 0;
    }

    .date-time-picker {
        grid-template-columns: 1fr;
    }
}

/* Professional management workspace */
.management-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 18px;
}

.management-head h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: 0;
}

.management-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.head-ledger {
    display: grid;
    align-content: center;
    min-height: 116px;
    padding: 18px;
    border: 1px solid rgba(64, 90, 122, 0.72);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(12, 22, 36, 0.94), rgba(18, 30, 47, 0.86));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.head-ledger span,
.head-ledger small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.head-ledger strong {
    margin: 4px 0;
    color: var(--text);
    font-size: 32px;
}

.control-panel,
.workspace-panel {
    border: 1px solid rgba(64, 90, 122, 0.72);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(14, 25, 40, 0.96), rgba(10, 18, 30, 0.94));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.control-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
}

.control-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.control-title span,
.professional-title span,
.action-section > span,
.action-note span,
.professional-form label > span,
.filter-grid label > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.control-title strong {
    color: var(--text);
    font-size: 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(150px, 1fr)) auto auto;
    gap: 10px;
    align-items: end;
}

.license-filter-grid,
.device-filter-grid {
    grid-template-columns: minmax(260px, 1fr) 190px auto auto;
}

.filter-grid label,
.professional-form label,
.action-note {
    display: grid;
    gap: 7px;
}

.filter-grid input,
.filter-grid select,
.professional-form input,
.professional-form select,
.professional-form textarea,
.professional-action-panel input,
.professional-action-panel select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(64, 90, 122, 0.9);
    border-radius: 10px;
    background: rgba(5, 12, 22, 0.86);
    color: var(--text);
    outline: none;
}

.filter-grid input,
.filter-grid select,
.professional-form input,
.professional-form select,
.professional-action-panel input,
.professional-action-panel select {
    padding: 0 12px;
}

.professional-form textarea {
    padding: 12px;
    resize: vertical;
}

.filter-grid input:focus,
.filter-grid select:focus,
.professional-form input:focus,
.professional-form select:focus,
.professional-form textarea:focus,
.professional-action-panel input:focus,
.professional-action-panel select:focus {
    border-color: rgba(37, 194, 245, 0.74);
    box-shadow: 0 0 0 3px rgba(37, 194, 245, 0.1);
}

.check-filter {
    display: inline-flex !important;
    align-items: center;
    grid-auto-flow: column;
    justify-content: start;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(64, 90, 122, 0.8);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(5, 12, 22, 0.56);
    white-space: nowrap;
}

.check-filter input {
    width: auto;
    min-height: auto;
}

.command-button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(37, 194, 245, 0.5);
    border-radius: 10px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.22);
}

.command-button:hover,
.action-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.ops-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.license-metrics {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ops-card {
    position: relative;
    min-height: 92px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid rgba(64, 90, 122, 0.68);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(13, 24, 38, 0.96), rgba(7, 14, 24, 0.92));
}

.ops-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--cyan);
}

.ops-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ops-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
}

.ops-card.success::before { background: var(--green); }
.ops-card.warning::before,
.ops-card.amber::before { background: var(--amber); }
.ops-card.danger::before { background: var(--red); }
.ops-card.violet::before { background: #a78bfa; }
.ops-card.muted::before,
.ops-card.neutral::before { background: #64748b; }

.workspace-panel {
    margin-bottom: 18px;
    padding: 18px;
}

.professional-title {
    align-items: center;
    margin-bottom: 16px;
}

.professional-title h2 {
    margin: 0 0 4px;
    font-size: 19px;
}

.record-chip,
.usage-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(100, 116, 139, 0.36);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.professional-table-shell {
    border-radius: 12px;
    background: rgba(3, 8, 15, 0.62);
}

.management-table {
    min-width: 1120px;
}

.management-table th {
    padding: 13px 14px;
    color: #94a3b8;
    background: rgba(6, 13, 24, 0.98);
}

.management-table td {
    padding: 13px 14px;
}

.management-table tbody tr:hover {
    background: rgba(37, 194, 245, 0.035);
}

.role-badge {
    color: #c4b5fd;
    border-color: rgba(196, 181, 253, 0.34);
    background: rgba(196, 181, 253, 0.08);
}

.avatar,
.device-icon {
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(37, 194, 245, 0.14), rgba(59, 130, 246, 0.08));
}

.device-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.device-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(37, 194, 245, 0.34);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
}

.professional-actions {
    min-width: 96px;
}

.professional-actions summary {
    min-height: 34px;
    border-color: rgba(100, 116, 139, 0.44);
    border-radius: 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.82);
}

.professional-action-panel {
    position: static;
    width: min(480px, calc(100vw - 90px));
    margin-top: 10px;
    padding: 14px;
    border: 1px solid rgba(64, 90, 122, 0.9);
    border-radius: 14px;
    background: #07111f;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.44);
}

.device-action-panel {
    width: min(390px, calc(100vw - 90px));
}

.action-section {
    display: grid;
    gap: 9px;
    padding: 11px;
    border: 1px solid rgba(64, 90, 122, 0.48);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.64);
}

.action-panel form + form,
.action-section + .action-section {
    margin-top: 9px;
}

.action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.action-button {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(100, 116, 139, 0.48);
    border-radius: 9px;
    color: var(--text);
    background: rgba(30, 41, 59, 0.88);
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
}

.action-button.full {
    width: 100%;
}

.action-button.success {
    border-color: rgba(34, 197, 94, 0.42);
    color: #bbf7d0;
    background: rgba(22, 101, 52, 0.44);
}

.action-button.warning {
    border-color: rgba(245, 158, 11, 0.42);
    color: #fde68a;
    background: rgba(146, 64, 14, 0.45);
}

.action-button.danger,
.danger-zone .action-button {
    border-color: rgba(239, 68, 68, 0.46);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.56);
}

.action-button.neutral {
    color: #dbeafe;
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.34);
    background: rgba(127, 29, 29, 0.16);
}

.license-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    gap: 16px;
    margin-bottom: 18px;
    align-items: start;
}

.professional-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.professional-form .span-2 {
    grid-column: span 2;
}

.professional-preview {
    margin-bottom: 14px;
}

.professional-preview > div {
    border-radius: 12px;
    background: rgba(3, 8, 15, 0.62);
}

.plan-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.plan-strip .plan-card {
    min-height: 94px;
    padding: 13px;
    border-radius: 12px;
    box-shadow: none;
}

.remaining-time {
    color: #bfdbfe;
    font-size: 13px;
}

@media (max-width: 1280px) {
    .filter-grid,
    .license-filter-grid,
    .device-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .license-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .management-head,
    .filter-grid,
    .license-filter-grid,
    .device-filter-grid,
    .ops-metrics,
    .license-metrics,
    .professional-form,
    .plan-strip {
        grid-template-columns: 1fr;
    }

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

    .head-ledger {
        min-height: auto;
    }

    .professional-action-panel,
    .device-action-panel {
        width: min(100%, calc(100vw - 56px));
    }
}

.back-link,
.row-link {
    color: #25c2f5;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.row-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-right: 8px;
}

.detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid rgba(37, 194, 245, 0.22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(37, 194, 245, 0.14), rgba(139, 92, 246, 0.07)),
        #0d1b2a;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

.detail-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.detail-avatar {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    color: #f5f7fa;
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #d32f2f, #7f1d1d);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 42px rgba(211, 47, 47, 0.3);
}

.detail-hero h1 {
    margin: 5px 0 3px;
    color: #f5f7fa;
    font-size: 32px;
}

.detail-hero p,
.detail-stamps,
.detail-card span,
.activity-row span,
.timeline-item span {
    color: #a7b3c6;
}

.badge-row,
.detail-stamps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-stamps {
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.detail-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    background: #132238;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.detail-card.metric {
    min-height: 98px;
}

.detail-card.metric strong {
    display: block;
    margin-top: 8px;
    color: #f5f7fa;
    font-size: 22px;
}

.detail-list {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
}

.detail-list dt {
    color: #a7b3c6;
    font-size: 13px;
}

.detail-list dd {
    min-width: 0;
    margin: 0;
    color: #f5f7fa;
    word-break: break-word;
}

.action-stack {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.action-stack.compact {
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.action-stack label,
.confirm-field {
    display: grid;
    gap: 6px;
}

.action-stack input,
.action-stack select,
.confirm-field input,
.confirm-field textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: #07111f;
    color: #f5f7fa;
    padding: 10px 12px;
}

.tab-surface {
    display: grid;
    gap: 18px;
}

.detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: #0d1b2a;
}

.detail-tabs a {
    color: #dbeafe;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(37, 194, 245, 0.08);
}

.activity-row,
.timeline-item {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.activity-row strong,
.timeline-item strong {
    color: #f5f7fa;
}

.activity-row p,
.timeline-item p {
    margin: 0;
    color: #cbd5e1;
}

.timeline {
    position: relative;
    display: grid;
    gap: 0;
}

.timeline-item {
    position: relative;
    padding-left: 20px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 17px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #25c2f5;
    box-shadow: 0 0 16px rgba(37, 194, 245, 0.55);
}

.timeline-item.warning::before {
    background: #ff9f43;
    box-shadow: 0 0 16px rgba(255, 159, 67, 0.5);
}

.timeline-item.critical::before,
.timeline-item.error::before {
    background: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

.inline-actions,
.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inline-actions form,
.inline-form {
    margin: 0;
}

.inline-actions input,
.inline-form input {
    min-width: 180px;
}

.recovery-head {
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(37, 194, 245, 0.06)),
        #0d1b2a;
}

.confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.68);
}

.confirm-backdrop[hidden] {
    display: none;
}

.confirm-modal {
    width: min(540px, 100%);
    padding: 22px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 18px;
    background: #0d1b2a;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

.confirm-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: #ef4444;
}

.confirm-copy h2 {
    margin: 0 0 6px;
    color: #f5f7fa;
}

.confirm-copy p {
    margin: 0 0 14px;
    color: #a7b3c6;
}

.confirm-states {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px;
    margin: 0 0 14px;
    border-radius: 12px;
    background: rgba(7, 17, 31, 0.75);
}

.confirm-states dt {
    color: #a7b3c6;
}

.confirm-states dd {
    margin: 0;
    color: #f5f7fa;
}

.confirm-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.16);
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.modal-open {
    overflow: hidden;
}

.release-head {
    align-items: center;
}

.release-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.release-metrics article {
    min-height: 118px;
    padding: 18px;
    border: 1px solid #243b55;
    border-radius: 16px;
    background: linear-gradient(145deg, #0d1b2a, #101f32);
    box-shadow: 0 16px 34px rgb(0 0 0 / 18%);
}

.release-metrics span,
.release-metrics small {
    display: block;
    color: #8fa1b9;
}

.release-metrics strong {
    display: block;
    margin: 9px 0 5px;
    color: #f5f7fa;
    font-size: 1.55rem;
}

.release-composer {
    margin-bottom: 20px;
    border-color: #2c5072;
}

.release-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.release-form label {
    display: grid;
    gap: 7px;
}

.release-form label > span {
    color: #e6edf7;
    font-weight: 700;
}

.release-form label > small {
    color: #8394ac;
    line-height: 1.45;
}

.release-form input,
.release-form select,
.release-form textarea {
    width: 100%;
    border: 1px solid #2d4664;
    border-radius: 10px;
    background: #091522;
    color: #f5f7fa;
    padding: 12px 13px;
    outline: none;
}

.release-form input:focus,
.release-form select:focus,
.release-form textarea:focus {
    border-color: #25c2f5;
    box-shadow: 0 0 0 3px rgb(37 194 245 / 12%);
}

.release-form .wide {
    grid-column: 1 / -1;
}

.release-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.release-toggles label {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 14px;
    border: 1px solid #293f5b;
    border-radius: 12px;
    background: #0a1725;
}

.release-toggles input {
    width: 18px;
}

.release-toggles small {
    grid-column: 2;
}

.release-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 15px;
    border: 1px solid #255641;
    border-radius: 12px;
    background: #0b211b;
    color: #a7e7c8;
}

.release-checklist strong,
.release-checklist small {
    flex-basis: 100%;
}

.release-sub {
    display: block;
    max-width: 280px;
    margin-top: 5px;
    overflow: hidden;
    color: #8292a8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.row-actions form {
    margin: 0;
}

.action-button.compact {
    min-height: 32px;
    padding: 7px 11px;
}

.release-preview {
    position: relative;
}

.release-preview summary {
    cursor: pointer;
    color: #6fd7f7;
}

.release-preview > div {
    position: absolute;
    z-index: 20;
    right: 0;
    width: 330px;
    padding: 16px;
    border: 1px solid #315271;
    border-radius: 12px;
    background: #07111f;
    box-shadow: 0 18px 45px rgb(0 0 0 / 45%);
}

.release-quick-edit {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.release-quick-edit label {
    display: grid;
    gap: 4px;
    color: #9fb0c6;
}

.release-quick-edit input,
.release-quick-edit textarea {
    width: 100%;
    border: 1px solid #2d4664;
    border-radius: 7px;
    background: #0b1725;
    color: #f5f7fa;
    padding: 8px;
}

.release-notes {
    white-space: pre-line;
}

@media (max-width: 1200px) {
    .release-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .release-metrics,
    .release-form {
        grid-template-columns: 1fr;
    }

    .release-form .wide {
        grid-column: auto;
    }
}

@media (max-width: 1180px) {
    .detail-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .detail-hero,
    .detail-identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-stamps {
        align-items: flex-start;
    }

    .detail-grid,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .confirm-states {
        grid-template-columns: 1fr;
    }
}
