:root {
    --ink: #18212f;
    --muted: #667085;
    --line: #d9dee8;
    --surface: #ffffff;
    --canvas: #f3f5f8;
    --primary: #175cd3;
    --primary-dark: #0f46a3;
    --success: #178a55;
    --warning: #b26409;
    --teal: #0e7c86;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
}

.particles-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
}

.particles-layer canvas {
    display: block;
}

body > main,
body > .toast-container,
body > .login-shell,
body > .install-shell {
    position: relative;
    z-index: 1;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.muted {
    color: var(--muted);
}

.topbar-title {
    position: relative;
    display: inline-block;
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.identity-chip {
    padding: 6px 10px;
    border: 1px solid rgba(23, 92, 211, 0.16);
    border-radius: 6px;
    color: #344054;
    background: rgba(255, 255, 255, 0.32);
}

.topbar-glow {
    color: transparent !important;
    background: linear-gradient(
        90deg,
        #175cd3 0%,
        #0e7c86 20%,
        #f8fafc 36%,
        #d97706 52%,
        #0e7c86 72%,
        #175cd3 100%
    );
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
    filter: drop-shadow(0 0 8px rgba(23, 92, 211, 0.24));
}

.app-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 22px auto 40px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(22, 34, 56, 0.04);
}

.panel + .panel,
.section-stack > * + * {
    margin-top: 18px;
}

.admin-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 0;
    align-items: start;
}

.app-shell.admin-layout {
    width: min(1240px, calc(100% - 32px));
    margin-top: 0;
}

.admin-layout > * + * {
    margin-top: 0;
}

.admin-agent-panel {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    height: 520px;
    min-width: 0;
    overflow: hidden;
}

.admin-inline-title {
    font-size: 19px;
    line-height: 1.2;
}

.admin-agent-heading {
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
}

.admin-agent-heading > div:first-child {
    flex: 0 1 auto;
    min-width: 0;
}

.admin-agent-titles {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-agent-heading .effect-title {
    margin: 0;
    font-size: 15px;
    white-space: nowrap;
}

.admin-agent-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    transform: translateX(8px);
}

.admin-agent-actions .btn {
    padding-inline: 0.4rem;
}

.admin-agent-actions .identity-chip {
    padding: 3px 7px;
    font-size: 12px;
}

.admin-agent-panel .panel-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
}

.admin-agent-panel .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.admin-agent-panel .table {
    min-width: 560px;
}

.admin-agent-panel .agent-action-cell {
    width: 190px;
}

.admin-agent-panel .table > :not(caption) > * > * {
    padding-top: 5px;
    padding-bottom: 5px;
}

.admin-agent-panel .pager {
    flex: 0 0 auto;
    margin-top: 10px;
}

.admin-summary-column {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    align-self: start;
}

.stat-grid.admin-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 92px;
}

.stat-grid.admin-stat-grid .stat-card {
    min-height: 92px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.admin-layout > .panel:not(.admin-agent-panel) {
    grid-column: 1 / -1;
}

.admin-log-panel {
    display: flex;
    flex-direction: column;
    height: 410px;
    min-width: 0;
    overflow: hidden;
}

.admin-log-panel .panel-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.admin-log-panel .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.admin-log-panel .table {
    min-width: 520px;
}

.panel-heading {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h1,
.panel-heading h2,
.panel-heading h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
}

.effect-title {
    position: relative;
    display: inline-block;
    padding-left: 14px;
    color: transparent !important;
    background: linear-gradient(90deg, #175cd3, #0e7c86, #d97706, #175cd3);
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
    filter: drop-shadow(0 0 8px rgba(23, 92, 211, 0.12));
}

.account-panel-title-track {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.effect-title::before {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    width: 4px;
    content: "";
    background: linear-gradient(180deg, #175cd3, #0e7c86);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(23, 92, 211, 0.4);
    animation: none;
}

.panel-heading p {
    margin: 6px 0 0;
}

.panel-body {
    padding: 20px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.stat-card {
    min-height: 112px;
    padding: 17px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.stat-card:nth-child(2) {
    border-left-color: var(--success);
}

.stat-card:nth-child(3) {
    border-left-color: var(--warning);
}

.stat-card:nth-child(4) {
    border-left-color: var(--teal);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.stat-value {
    margin-top: 10px;
    font-size: 28px;
    font-weight: 750;
    line-height: 1;
}

.stat-foot {
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}

.agent-shell {
    width: min(1280px, calc(100% - 32px));
}

.agent-top-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.agent-stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agent-stat-grid > .stat-card:not(.agent-session-card) .stat-label,
.agent-stat-grid > .stat-card:not(.agent-session-card) .stat-value,
.agent-stat-grid > .stat-card:not(.agent-session-card) .stat-foot {
    color: transparent !important;
    background: linear-gradient(90deg, #175cd3, #0e7c86, #d97706, #175cd3);
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
    filter: drop-shadow(0 0 7px rgba(23, 92, 211, 0.18));
}

.agent-stat-grid > .stat-card:not(.agent-session-card) .stat-value {
    animation: none;
}

.agent-heading {
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    padding: 21px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.agent-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 780;
}

.agent-session-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 10px 11px;
    align-items: center;
    padding: 13px 14px;
    border-left-color: #d97706 !important;
}

.agent-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #175cd3);
    border-radius: 50%;
    box-shadow: 0 5px 14px rgba(23, 92, 211, 0.18);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.agent-session-info {
    min-width: 0;
}

.agent-session-name {
    margin-top: 4px;
    color: #1d2939;
    font-size: 16px;
    font-weight: 760;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.agent-session-card .btn {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
    padding: 5px 8px;
    white-space: nowrap;
}

.agent-quota {
    width: 100%;
    min-width: 0;
}

.quota-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.agent-glow-text,
.agent-quota-value {
    color: transparent !important;
    background: linear-gradient(90deg, #175cd3, #0e7c86, #d97706, #175cd3);
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
    filter: drop-shadow(0 0 7px rgba(23, 92, 211, 0.22));
}

.agent-quota > strong {
    display: block;
    margin: 4px 0 7px;
    font-size: 18px;
}

.agent-quota-value {
    font-weight: 800;
}

.quota-track {
    height: 9px;
    padding: 2px;
    overflow: hidden;
    background: #e4e7ec;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}

.quota-track i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--teal));
    border-radius: 999px;
    transition: width 300ms ease, background 180ms ease;
}

.quota-track i.full {
    background: linear-gradient(90deg, #d97706, #c93737);
}

.quota-track i.unlimited {
    background: linear-gradient(90deg, #84c5cc, #6d9ee8, #84c5cc);
    background-size: 100% auto;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.toolbar .form-control,
.toolbar .form-select {
    min-width: 150px;
}

.toolbar .grow {
    flex: 1 1 220px;
}

.account-filter-search {
    flex: 0 1 30%;
    width: 30%;
    max-width: 30%;
    min-width: 220px;
}

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

.form-grid label,
.field {
    display: block;
}

.form-grid label > span,
.field > span {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
}

.field.field-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field.field-inline > span {
    margin-bottom: 0;
    white-space: nowrap;
}

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

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 750;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

.table {
    margin-bottom: 0;
    color: var(--ink);
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 11px 10px;
    border-color: #e6e9ef;
}

.table thead th {
    color: #475467;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.table code,
.result-list code {
    color: #0f46a3;
    overflow-wrap: anywhere;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn {
    border-radius: 6px;
    font-weight: 650;
}

.btn-sm {
    padding: 4px 9px;
    font-size: 12px;
}

.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
}

.btn-primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
}

.badge-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.status-inactive {
    color: #664d03;
    background: #fff3cd;
}

.status-normal {
    color: #067647;
    background: #d9f7e8;
}

.status-disabled {
    color: #a32222;
    background: #fee4e2;
}

.account-workspace {
    overflow: hidden;
}

.account-workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    padding: 9px 18px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
}

.workspace-tabs {
    display: flex;
    gap: 4px;
    min-height: 40px;
    flex: 0 0 auto;
}

.workspace-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: #475467;
    background: transparent;
    border: 0;
    font-weight: 700;
}

.workspace-tab::after {
    position: absolute;
    right: 8px;
    bottom: -1px;
    left: 8px;
    height: 3px;
    content: "";
    background: transparent;
    border-radius: 3px 3px 0 0;
}

.workspace-tab.active {
    color: var(--primary);
}

.workspace-tab.active::after {
    background: var(--primary);
}

.tab-count {
    min-width: 24px;
    padding: 2px 6px;
    color: #475467;
    background: #e9edf4;
    border-radius: 999px;
    font-size: 11px;
    text-align: center;
}

.workspace-tab.active .tab-count {
    color: #fff;
    background: var(--primary);
}

.effect-tab-label {
    color: transparent;
    background: linear-gradient(90deg, #175cd3, #0e7c86, #d97706, #175cd3);
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
    filter: drop-shadow(0 0 7px rgba(23, 92, 211, 0.18));
}

.account-toolbar {
    display: flex;
    flex: 1 1 520px;
    flex-wrap: nowrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 0;
}

.account-search {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
}

.account-table-wrap {
    min-height: 260px;
}

.account-table {
    min-width: 760px;
}

.account-table .index-column {
    width: 58px;
}

.account-table .action-column {
    width: 250px;
}

.account-table .nickname-column {
    min-width: 170px;
    max-width: 260px;
    overflow-wrap: anywhere;
}

.wxid-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 0;
    color: #153b75;
    background: transparent;
    border: 0;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    overflow-wrap: anywhere;
}

.wxid-value:hover {
    color: var(--primary);
}

.copy-label {
    padding: 2px 5px;
    color: #667085;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
    border-radius: 4px;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 10px;
    font-weight: 650;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.toast-container {
    position: fixed;
    top: 22px;
    left: 50%;
    z-index: 10000;
    transform: translateX(-50%);
}

.toast-message {
    display: none;
    min-width: 260px;
    max-width: min(560px, calc(100vw - 32px));
    padding: 13px 20px;
    color: #fff;
    background: rgba(16, 24, 40, 0.96);
    border-radius: 7px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.3);
    font-weight: 650;
    text-align: center;
}

.toast-message.success {
    background: rgba(10, 112, 68, 0.96);
}

.toast-message.error {
    background: rgba(174, 39, 39, 0.96);
}

.login-page,
.install-page {
    min-height: 100vh;
    background: #eef1f5;
}

.login-shell,
.install-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    padding: 28px;
    place-items: center;
}

.login-panel {
    width: min(430px, 100%);
    overflow: hidden;
}

.login-accent {
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--teal), #d97706);
}

.login-panel .panel-body,
.install-panel .panel-body {
    padding: 28px;
}

.login-panel h1,
.install-panel h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 780;
}

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

.captcha-image {
    width: 150px;
    height: 42px;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.install-shell {
    align-items: start;
}

.install-panel {
    width: min(860px, 100%);
    margin: 36px 0;
}

.install-panel h2 {
    margin: 24px 0 13px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 750;
}

.result-list {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 10px 18px;
    margin: 18px 0;
}

.result-list dt {
    color: #475467;
}

.result-list dd {
    margin: 0;
}

dialog {
    position: fixed;
    inset: 0;
    width: min(480px, calc(100vw - 28px));
    margin: auto;
    padding: 0;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.24);
}

dialog::backdrop {
    background: rgba(16, 24, 40, 0.48);
}

.dialog-form {
    padding: 20px;
}

.admin-dialog .dialog-form {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
}

.admin-dialog .activation-dialog-inner::after {
    content: none;
}

.admin-dialog-message {
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.admin-dialog-input {
    position: relative;
    z-index: 1;
    text-align: left;
}

.activation-dialog {
    width: min(440px, calc(100vw - 32px));
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.13), transparent 45%),
        linear-gradient(160deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 8px;
    box-shadow:
        0 34px 100px rgba(15, 23, 42, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.85) inset,
        0 0 42px rgba(37, 99, 235, 0.18);
    opacity: 0;
    transform: translateY(18px) scale(0.9);
}

.activation-dialog[open] {
    animation: activation-dialog-in 320ms cubic-bezier(0.2, 0.9, 0.25, 1.15) forwards;
}

.activation-dialog::backdrop {
    background:
        radial-gradient(circle at center, rgba(23, 92, 211, 0.16), transparent 54%),
        rgba(8, 15, 30, 0.58);
    backdrop-filter: blur(7px);
    animation: activation-backdrop-in 240ms ease-out both;
}

.activation-dialog-inner {
    position: relative;
    padding: 28px 24px 24px;
    overflow: hidden;
    text-align: center;
}

.activation-dialog-inner::after {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 55%;
    height: 180%;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    transform: rotate(18deg);
    animation: activation-dialog-scan 2.8s ease-in-out infinite;
    pointer-events: none;
}

.activation-dialog-orbit {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    place-items: center;
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    background: linear-gradient(135deg, #175cd3, #0e7c86);
    border-radius: 50%;
    box-shadow:
        0 0 0 8px rgba(37, 99, 235, 0.08),
        0 0 26px rgba(37, 99, 235, 0.38);
    animation: activation-orbit-pulse 1.8s ease-in-out infinite;
}

.activation-dialog-orbit::before {
    position: absolute;
    inset: -7px;
    content: "";
    border: 1px solid rgba(37, 99, 235, 0.48);
    border-top-color: #0e7c86;
    border-radius: 50%;
    animation: activation-orbit-spin 2.4s linear infinite;
}

.activation-dialog h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 22px;
}

.activation-dialog .eyebrow,
.activation-dialog-wxid,
.activation-dialog-description {
    position: relative;
    z-index: 1;
}

.activation-dialog-wxid {
    margin: 0 0 10px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    color: #175cd3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    background: rgba(239, 246, 255, 0.92);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 6px;
}

.activation-dialog-description {
    margin: 0 0 20px;
    color: var(--muted);
}

.activation-dialog-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
}

.activation-dialog-confirm {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(23, 92, 211, 0.24);
}

.activation-dialog-confirm::after {
    position: absolute;
    top: -50%;
    left: -70%;
    width: 45%;
    height: 200%;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: rotate(18deg);
    animation: activation-button-shine 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes activation-dialog-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes activation-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes activation-orbit-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.07);
    }
}

@keyframes activation-orbit-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes activation-dialog-scan {
    0%,
    22% {
        left: -35%;
        opacity: 0;
    }

    45% {
        opacity: 0.75;
    }

    78%,
    100% {
        left: 120%;
        opacity: 0;
    }
}

@keyframes activation-button-shine {
    0%,
    35% {
        left: -70%;
        opacity: 0;
    }

    55% {
        opacity: 0.8;
    }

    80%,
    100% {
        left: 130%;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .activation-dialog[open],
    .activation-dialog::backdrop,
    .activation-dialog-inner::after,
    .activation-dialog-orbit,
    .activation-dialog-orbit::before,
    .activation-dialog-confirm::after {
        animation: none;
    }

    .activation-dialog {
        opacity: 1;
        transform: none;
    }
}

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

    .admin-layout {
        display: flex;
        flex-direction: column;
    }

    .admin-layout > * + * {
        margin-top: 18px;
    }

    .admin-agent-panel {
        order: 1;
        height: auto;
    }

    .admin-summary-column {
        order: 2;
        position: static;
    }

    .admin-layout > .panel:not(.admin-agent-panel) {
        order: 3;
    }

    .admin-agent-panel .table-wrap {
        max-height: 480px;
    }

    .admin-log-panel {
        height: auto;
        max-height: 420px;
    }

    .agent-top-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .app-shell {
        width: min(100% - 20px, 1440px);
        margin-top: 12px;
    }

    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid.admin-stat-grid {
        grid-template-columns: 1fr;
    }

    .agent-stat-grid {
        grid-template-columns: 1fr;
    }

    .agent-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .agent-quota {
        width: 100%;
    }

    .workspace-tabs {
        flex: 1 1 100%;
    }

    .workspace-tab {
        flex: 1 1 50%;
        justify-content: center;
    }

    .account-search {
        flex: 1 1 100%;
        flex-basis: 100%;
        width: 100%;
        max-width: none;
    }

    .account-filter-search {
        flex-basis: 100%;
        width: 100%;
        max-width: none;
    }

    .account-workspace-header {
        align-items: stretch;
        flex-direction: column;
    }

    .account-toolbar {
        flex-wrap: wrap;
    }

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

    .panel-heading,
    .panel-body {
        padding: 15px;
    }

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

    .login-shell,
    .install-shell {
        padding: 15px;
    }
}
