:root {
    --topbar-height: 52px;
    --sidebar-width: 240px;
    --hub-dark: #2f3032;
    --hub-dark-soft: #3a3b3d;
    --hub-bg: #f3f5f8;
    --hub-card-border: #d4dbe5;
    --hub-blue: #2463d8;
    --hub-teal: #007474;
    --hub-text: #0f2f4a;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--hub-dark);
    color: var(--hub-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.ea-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    background: var(--hub-dark);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-sidebar-zone {
    flex: 0 0 calc(var(--sidebar-width) - 24px);
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.ea-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    z-index: 50;
    width: var(--sidebar-width);
    overflow: visible;
    padding: 10px 8px 24px 6px;
    background: var(--hub-dark);
    color: #fff;
    border-top-right-radius: 0;
    box-shadow: inset -1px 0 rgba(255, 255, 255, 0.04), 16px 0 36px rgba(15, 23, 42, 0.08);
}

.ea-sidebar::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 18px;
    height: 1px;
    background: var(--hub-dark);
    pointer-events: none;
}

.ea-content {
    position: relative;
    z-index: 20;
    min-height: calc(100vh - var(--topbar-height));
    margin-top: var(--topbar-height);
    margin-left: var(--sidebar-width);
    padding: 24px 24px 40px 24px;
    background: var(--hub-bg);
    border-top-left-radius: 22px;
}

.logo-pill {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff6b35, #e53e3e);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.icon-button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    transition: background 160ms ease, color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.search-shell {
    height: 31px;
    min-width: 220px;
    max-width: 560px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.94);
    padding: 0 13px;
}

.nav-section-line {
    height: 1px;
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.16);
}

.nav-group {
    position: relative;
    margin-bottom: 4px;
}

.nav-item {
    position: relative;
    width: 100%;
    min-height: 42px;
    border: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 0 999px 999px 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-align: left;
    transition: background 160ms ease, transform 160ms ease;
}

.nav-item:hover,
.nav-group:focus-within > .nav-item {
    background: rgba(255, 255, 255, 0.10);
}

.nav-item.active {
    background: #6d6f72;
}

.nav-icon {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
}

.nav-chevron {
    margin-left: auto;
    font-size: 16px;
    opacity: 0.78;
}

.nav-badge {
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #e43163;
    font-size: 11px;
    font-weight: 900;
}

.nav-flyout {
    position: absolute;
    top: 0;
    left: calc(100% + 10px);
    width: 265px;
    padding: 8px;
    border-radius: 16px;
    background: #ffffff;
    color: #17324d;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.26);
    border: 1px solid rgba(15, 23, 42, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px) scale(0.985);
    transition: opacity 150ms ease, transform 150ms ease;
}

.nav-flyout::before {
    content: "";
    position: absolute;
    top: 13px;
    left: -8px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    background: #fff;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.nav-group:hover > .nav-flyout,
.nav-group:focus-within > .nav-flyout,
.nav-group.flyout-open > .nav-flyout {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.flyout-title {
    padding: 8px 10px 7px;
    color: #526477;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.flyout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    color: #17324d;
    text-align: left;
    transition: background 130ms ease, color 130ms ease;
}

.flyout-link:hover,
.flyout-link:focus-visible,
.flyout-link.active {
    background: #edf3ff;
    color: var(--hub-blue);
    outline: none;
}

.stat-card {
    min-height: 126px;
    border: 1px solid var(--hub-card-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
}

.stat-card.warning {
    border-color: #f1c955;
    background: #fff9df;
}

.stat-card-icon-spacer {
    min-height: 24px;
}

.panel-card {
    border: 1px solid var(--hub-card-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 0;
    padding: 0 15px;
    border-radius: 5px;
    background: var(--hub-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.14);
}

.primary-button:hover,
.primary-button:focus-visible {
    background: #1d55c2;
    outline: none;
}

.mobile-backdrop {
    display: none;
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 232px;
    }

    .ea-sidebar {
        transform: translateX(-110%);
        transition: transform 180ms ease;
        box-shadow: 20px 0 45px rgba(15, 23, 42, 0.26);
    }

    .ea-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .ea-content {
        margin-left: 0;
        padding-left: 16px;
        padding-right: 16px;
        border-top-left-radius: 0;
    }

    .mobile-backdrop {
        display: block;
        position: fixed;
        inset: var(--topbar-height) 0 0 0;
        z-index: 45;
        border: 0;
        background: rgba(15, 23, 42, 0.45);
    }

    .topbar-sidebar-zone {
        flex: 0 0 auto;
    }

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

    .nav-flyout {
        left: calc(100% + 8px);
        width: min(265px, calc(100vw - var(--sidebar-width) - 24px));
    }
}

@media (max-width: 640px) {
    .topbar-hide-sm {
        display: none !important;
    }

    .ea-content {
        padding-top: 18px;
    }

    .nav-flyout {
        position: fixed;
        top: calc(var(--topbar-height) + 10px);
        left: 16px;
        right: 16px;
        width: auto;
    }

    .nav-flyout::before {
        display: none;
    }
}

/* v006 Accounts records page */
.accounts-content {
    padding-top: 20px;
}

.account-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.account-page-heading h1 {
    margin: 0;
    color: #061f43;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 1000;
    letter-spacing: -0.045em;
}

.account-page-heading p {
    margin: 6px 0 0;
    color: rgba(24, 67, 118, 0.78);
    font-size: 14px;
}

.account-mode-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.account-mode-card {
    min-height: 58px;
    border: 1px solid var(--hub-card-border);
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 12px 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    color: #061f43;
    text-align: left;
    transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.account-mode-card:hover,
.account-mode-card:focus-visible {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.account-mode-card.active {
    border-color: #b7c8df;
    box-shadow: inset 0 -4px var(--hub-blue), 0 1px 2px rgba(15, 23, 42, 0.08);
}

.account-mode-icon {
    font-size: 18px;
    color: var(--hub-blue);
    line-height: 1;
}

.account-mode-copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.account-mode-value {
    color: var(--hub-teal);
    font-weight: 1000;
    font-size: 18px;
    letter-spacing: -0.04em;
}

.account-mode-label {
    color: #061f43;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.records-shell {
    border: 1px solid #c9d3df;
    background: #fff;
    min-height: 620px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.records-tabs-row {
    min-height: 47px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #c9d3df;
    background: #fbfcfe;
}

.records-tab {
    min-width: 118px;
    border: 0;
    border-right: 1px solid #d2dbe6;
    background: transparent;
    color: #061f43;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 1000;
    position: relative;
}

.records-tab.active {
    background: #fff;
}

.records-tab.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hub-blue);
}

.records-tabs-spacer {
    flex: 1;
}

.records-add-button {
    align-self: center;
    margin-right: 12px;
}

.records-inner {
    margin: 18px 0 22px;
    border-top: 1px solid #c6d0dc;
    border-bottom: 1px solid #c6d0dc;
    padding: 14px 20px 18px;
    min-height: 520px;
    background: #fff;
}

.records-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.records-search {
    height: 34px;
    width: min(740px, 100%);
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #b9c4d1;
    border-radius: 999px;
    padding: 0 13px;
    background: #fff;
    color: #55718d;
}

.records-search input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #0f2f4a;
    font-size: 13px;
}

.records-search input::placeholder {
    color: #647993;
}

.records-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.secondary-button,
.ghost-button,
.success-button {
    min-height: 32px;
    border: 0;
    border-radius: 5px;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 1000;
}

.secondary-button {
    background: var(--hub-blue);
    color: #fff;
}

.ghost-button {
    background: transparent;
    color: #061f43;
}

.ghost-button:hover,
.ghost-button:focus-visible {
    background: #edf3ff;
    outline: none;
}

.success-button {
    background: #74c69d;
    color: #fff;
}

.records-sort-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 6px 0 14px 10px;
}

.records-sort-row button {
    border: 0;
    background: transparent;
    color: #061f43;
    font-size: 13px;
    font-weight: 1000;
}

.records-sort-row button.active {
    height: 32px;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--hub-blue);
    color: #fff;
    box-shadow: 0 5px 12px rgba(36, 99, 216, 0.22);
}

.records-sort-row .circle-action {
    width: 32px;
    height: 32px;
    border: 1px solid #c4d0de;
    border-radius: 999px;
    background: #fff;
    color: #061f43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.records-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #cfd8e3;
    border-radius: 3px;
}

.records-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    color: #061f43;
    font-size: 13px;
}

.records-table th {
    background: #f4f7fa;
    border-right: 1px solid #cfd8e3;
    border-bottom: 1px solid #cfd8e3;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.records-table th:first-child,
.records-table td:first-child {
    width: 42px;
    text-align: center;
}

.records-table td {
    border-right: 1px solid #d5dde7;
    border-bottom: 1px solid #d5dde7;
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.records-table tr:last-child td {
    border-bottom: 0;
}

.records-table th:last-child,
.records-table td:last-child {
    border-right: 0;
}

.records-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.record-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.record-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3f9;
    color: #17324d;
    border: 1px solid #cdd7e3;
    font-size: 9px;
    font-weight: 1000;
}

.record-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--hub-teal);
    font-size: 13px;
    font-weight: 1000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.record-sub {
    margin-top: 2px;
    color: #6b7f95;
    font-size: 11px;
    font-weight: 700;
}

.status-pill {
    min-width: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 1000;
}

.status-active {
    background: #dff8ea;
    color: #17623b;
}

.status-disabled {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fff3cd;
    color: #7a5200;
}

.status-neutral {
    background: #eef3f8;
    color: #42566c;
}

.heartbeat-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 7px;
    background: #c2ccd8;
}

.heartbeat-dot.online {
    background: #22c55e;
}

.records-empty-cell {
    white-space: normal !important;
    padding: 42px 24px !important;
}

.records-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
    color: #42566c;
    text-align: left;
}

.records-empty-state strong {
    display: block;
    color: #061f43;
    font-size: 15px;
    margin-bottom: 4px;
}

.records-empty-state p {
    margin: 0;
    line-height: 1.5;
}

.records-empty-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #edf3ff;
    color: var(--hub-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    flex: 0 0 auto;
}

.records-count {
    margin: 12px 0 0;
    color: #061f43;
    font-size: 13px;
    font-weight: 1000;
}


/* v006 Account activation, licence copy and left drawer */
.account-table-v006 {
    min-width: 920px;
}

.account-table-v006 th:first-child,
.account-table-v006 td:first-child {
    width: auto;
    text-align: left;
}

.copy-notice {
    color: #17623b;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.activate-toggle {
    min-width: 96px;
    height: 30px;
    border: 1px solid #c7d2df;
    border-radius: 999px;
    background: #f8fafc;
    color: #17324d;
    font-size: 12px;
    font-weight: 1000;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.activate-toggle.active {
    border-color: #17623b;
    background: #dff8ea;
    color: #17623b;
}

.licence-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.licence-preview {
    max-width: 190px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    color: #526477;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 800;
}

.copy-licence-button {
    min-height: 30px;
    border: 1px solid #b8c6d6;
    border-radius: 6px;
    background: #fff;
    color: #061f43;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.copy-licence-button:hover,
.copy-licence-button:focus-visible {
    background: #edf3ff;
    border-color: var(--hub-blue);
    outline: none;
}

.copy-licence-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.drawer-backdrop {
    position: fixed;
    top: var(--topbar-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    z-index: 80;
    border: 0;
    background: rgba(15, 23, 42, 0.32);
}

.account-drawer {
    position: fixed;
    top: var(--topbar-height);
    left: var(--sidebar-width);
    bottom: 0;
    z-index: 90;
    width: min(460px, calc(100vw - var(--sidebar-width))); 
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #cbd5e1;
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.24);
    animation: drawer-slide-in 180ms ease-out both;
}

@keyframes drawer-slide-in {
    from { transform: translateX(-105%); }
    to { transform: translateX(0); }
}

.drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
}

.drawer-header p {
    margin: 0 0 3px;
    color: var(--hub-blue);
    font-size: 11px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.drawer-header h2 {
    margin: 0;
    color: #061f43;
    font-size: 24px;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    background: #fff;
    color: #17324d;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.drawer-close:hover,
.drawer-close:focus-visible {
    background: #edf3ff;
    outline: none;
}

.drawer-form {
    padding: 18px 22px 24px;
}

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

.drawer-field {
    display: block;
    margin-bottom: 13px;
}

.drawer-field span {
    display: block;
    margin-bottom: 6px;
    color: #061f43;
    font-size: 12px;
    font-weight: 1000;
}

.drawer-field input,
.drawer-field select,
.licence-copy-row input {
    width: 100%;
    height: 38px;
    border: 1px solid #bfcada;
    border-radius: 7px;
    background: #fff;
    color: #0f2f4a;
    padding: 0 11px;
    font-size: 13px;
    outline: none;
}

.drawer-field input:focus,
.drawer-field select:focus,
.licence-copy-row input:focus {
    border-color: var(--hub-blue);
    box-shadow: 0 0 0 3px rgba(36, 99, 216, 0.13);
}

.licence-generator {
    margin-top: 4px;
    padding: 14px;
    border: 1px solid #d2dbe6;
    border-radius: 10px;
    background: #f8fafc;
}

.licence-generator-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.licence-copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.licence-copy-row input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 800;
    background: #fff;
}

.drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e1e7ef;
}


/* v006 current drawer/form class names */
.drawer-body {
    padding: 18px 22px 24px;
}

.form-grid {
    display: grid;
    gap: 13px;
}

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

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label,
.licence-field > label {
    color: #061f43;
    font-size: 12px;
    font-weight: 1000;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 38px;
    border: 1px solid #bfcada;
    border-radius: 7px;
    background: #fff;
    color: #0f2f4a;
    padding: 0 11px;
    font-size: 13px;
    outline: none;
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--hub-blue);
    box-shadow: 0 0 0 3px rgba(36, 99, 216, 0.13);
}

.form-error {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #991b1b;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.licence-field {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid #d2dbe6;
    border-radius: 10px;
    background: #f8fafc;
}

.licence-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.licence-box,
.licence-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 900;
    color: #17324d;
}

.licence-box {
    min-height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #bfcada;
    border-radius: 7px;
    background: #fff;
    padding: 0 11px;
}

.form-note {
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #f8fbff;
    color: #475f79;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.activation-toggle {
    min-width: 96px;
    height: 30px;
    border: 1px solid #c7d2df;
    border-radius: 999px;
    background: #f8fafc;
    color: #17324d;
    font-size: 12px;
    font-weight: 1000;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.activation-toggle.active {
    border-color: #17623b;
    background: #dff8ea;
    color: #17623b;
}

.licence-copy-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.licence-code {
    max-width: 180px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #526477;
}

.copy-button {
    min-height: 30px;
    border: 1px solid #b8c6d6;
    border-radius: 6px;
    background: #fff;
    color: #061f43;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.copy-button:hover,
.copy-button:focus-visible {
    background: #edf3ff;
    border-color: var(--hub-blue);
    outline: none;
}

@media (max-width: 1280px) {
    .account-mode-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 900px) {
    .account-page-heading {
        flex-direction: column;
        align-items: stretch;
    }

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

    .records-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .records-actions {
        justify-content: flex-start;
    }

    .records-inner {
        margin: 14px 0 16px;
        padding: 12px;
    }

    .drawer-backdrop {
        left: 0;
    }

    .account-drawer {
        left: 0;
        width: min(460px, 100vw);
    }
}

@media (max-width: 640px) {
    .account-mode-grid {
        grid-template-columns: 1fr;
    }

    .records-tabs-row {
        overflow-x: auto;
    }

    .records-tab {
        min-width: 122px;
    }

    .records-add-button {
        display: none;
    }

    .records-sort-row {
        gap: 8px;
        margin-left: 0;
    }

    .records-sort-row button:not(.circle-action) {
        border: 1px solid #d4dbe5;
        border-radius: 999px;
        padding: 7px 10px;
    }

    .records-sort-row button.active {
        height: auto;
    }

    .records-empty-state {
        align-items: flex-start;
    }

    .drawer-grid,
    .form-two-cols {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .licence-copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .licence-row,
    .licence-copy-cell {
        grid-template-columns: 1fr;
        align-items: stretch;
        flex-direction: column;
    }

    .drawer-actions {
        flex-direction: column-reverse;
    }

    .drawer-actions .primary-button,
    .drawer-actions .ghost-button {
        width: 100%;
    }
}


/* v006 final alignment and simplified EA account controls */
.ea-topbar {
    gap: 0;
    padding: 0;
}

.topbar-sidebar-zone {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 12px;
}

.topbar-content-zone {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
    padding-right: 12px;
}

.topbar-content-zone .search-shell {
    flex: 0 1 560px;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-icon,
.account-mode-icon,
.records-empty-icon {
    display: none !important;
}

.stat-card {
    justify-content: flex-end !important;
}

.account-mode-card {
    justify-content: center;
}

.account-mode-copy {
    justify-content: center;
}

.account-table-v006 {
    min-width: 920px;
}

.account-table-v006 th:first-child,
.account-table-v006 td:first-child {
    width: auto !important;
    text-align: left !important;
}

.activation-toggle {
    min-width: 104px;
    height: 30px;
    border: 1px solid #c7d2df;
    border-radius: 999px;
    background: #f8fafc;
    color: #17324d;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 1000;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.activation-toggle:hover,
.activation-toggle:focus-visible {
    outline: none;
    border-color: var(--hub-blue);
    background: #edf3ff;
}

.activation-toggle.active {
    border-color: #17623b;
    background: #dff8ea;
    color: #17623b;
}

.licence-copy-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.licence-code {
    max-width: 190px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    color: #526477;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 800;
}

.copy-button {
    min-height: 30px;
    border: 1px solid #b8c6d6;
    border-radius: 6px;
    background: #fff;
    color: #061f43;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 1000;
    white-space: nowrap;
}

.copy-button:hover,
.copy-button:focus-visible {
    background: #edf3ff;
    border-color: var(--hub-blue);
    outline: none;
}

.drawer-backdrop {
    left: 0 !important;
}

.account-drawer {
    left: 0 !important;
    width: min(460px, 100vw) !important;
}

.drawer-body {
    padding: 18px 22px 24px;
}

.form-grid {
    display: grid;
    gap: 0;
}

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

.form-field {
    display: block;
    margin-bottom: 13px;
}

.form-field label,
.licence-field > label {
    display: block;
    margin-bottom: 6px;
    color: #061f43;
    font-size: 12px;
    font-weight: 1000;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 38px;
    border: 1px solid #bfcada;
    border-radius: 7px;
    background: #fff;
    color: #0f2f4a;
    padding: 0 11px;
    font-size: 13px;
    outline: none;
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--hub-blue);
    box-shadow: 0 0 0 3px rgba(36, 99, 216, 0.13);
}

.form-error {
    margin-bottom: 12px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff1f2;
    color: #991b1b;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 900;
}

.licence-field {
    margin-top: 4px;
    padding: 14px;
    border: 1px solid #d2dbe6;
    border-radius: 10px;
    background: #f8fafc;
}

.licence-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.licence-box {
    min-height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #bfcada;
    border-radius: 7px;
    background: #fff;
    color: #0f2f4a;
    padding: 0 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 800;
}

.form-note {
    margin-top: 12px;
    border-radius: 8px;
    background: #edf3ff;
    color: #24496f;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e1e7ef;
}

@media (max-width: 900px) {
    .topbar-sidebar-zone {
        flex: 0 0 auto;
        width: auto;
    }

    .topbar-content-zone {
        padding-left: 0;
    }
}

@media (max-width: 640px) {
    .form-two-cols,
    .licence-row {
        grid-template-columns: 1fr;
    }
}
