.axem-shell {
    --axem-accent: #6d5dfc;
    --axem-bg: #0b1020;
    --axem-card: rgba(13, 19, 38, 0.86);
    --axem-line: rgba(255, 255, 255, 0.08);
    --axem-text: #eef2ff;
    --axem-muted: #98a2b3;
    --axem-soft: rgba(255, 255, 255, 0.04);
    --axem-success: #22c55e;
    --axem-warning: #f59e0b;
    --axem-danger: #ef4444;
    color: var(--axem-text);
    margin: 24px 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.axem-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(109, 93, 252, 0.28), transparent 22%),
        radial-gradient(circle at bottom left, rgba(36, 174, 255, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    background-color: var(--axem-bg);
    border: 1px solid var(--axem-line);
    box-shadow: 0 22px 70px rgba(2, 8, 23, 0.45);
    padding: 28px;
}

.axem-card::before,
.axem-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
}

.axem-card::before {
    width: 180px;
    height: 180px;
    right: -40px;
    top: -50px;
    background: rgba(109, 93, 252, 0.35);
}

.axem-card::after {
    width: 160px;
    height: 160px;
    left: -60px;
    bottom: -70px;
    background: rgba(25, 184, 166, 0.22);
}

.axem-hero,
.axem-result-top,
.axem-input-row,
.axem-progress-meta,
.axem-panel-header,
.axem-chip-row,
.axem-grid-2 {
    display: flex;
    gap: 16px;
}

.axem-hero,
.axem-panel-header,
.axem-progress-meta,
.axem-result-top {
    justify-content: space-between;
    align-items: center;
}

.axem-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(238, 242, 255, 0.72);
}

.axem-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--axem-accent);
    box-shadow: 0 0 18px rgba(109, 93, 252, 0.8);
}

.axem-title {
    margin: 10px 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.05;
    color: #fff;
}

.axem-subtitle,
.axem-helper,
.axem-empty-state p,
.axem-meta {
    color: var(--axem-muted);
    line-height: 1.6;
}

.axem-badge-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.axem-badge,
.axem-status-pill,
.axem-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.axem-status-pill[data-tone="working"] {
    background: rgba(109, 93, 252, 0.16);
    border-color: rgba(109, 93, 252, 0.32);
}

.axem-status-pill[data-tone="done"] {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.34);
}

.axem-form {
    margin-top: 24px;
}

.axem-label,
.axem-subpanel h4,
.axem-panel h3 {
    color: #fff;
}

.axem-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.axem-input-row {
    align-items: center;
}

.axem-input {
    flex: 1;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.axem-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.axem-input:focus {
    border-color: rgba(109, 93, 252, 0.55);
    box-shadow: 0 0 0 5px rgba(109, 93, 252, 0.15);
}

.axem-button {
    min-width: 190px;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--axem-accent), #3bc6ff);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(109, 93, 252, 0.28);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.axem-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 36px rgba(109, 93, 252, 0.34);
}

.axem-button:disabled {
    cursor: wait;
    opacity: .86;
}

.axem-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

.axem-panel,
.axem-subpanel {
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.axem-panel {
    padding: 22px;
}

.axem-subpanel {
    padding: 18px;
}

.axem-progress-wrap {
    margin-top: 18px;
}

.axem-progress {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.axem-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--axem-accent), #3bc6ff);
    transition: width .3s ease;
}

.axem-progress-meta {
    margin-top: 10px;
    font-size: 13px;
    color: var(--axem-muted);
}

.axem-step-list,
.axem-subpanel ul {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
}

.axem-step-list li,
.axem-subpanel li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 0 0 24px;
    color: var(--axem-muted);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.axem-step-list li:last-child,
.axem-subpanel li:last-child {
    border-bottom: 0;
}

.axem-step-list li::before,
.axem-subpanel li::before {
    content: "";
    position: absolute;
    left: 0;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.axem-step-list li.is-active,
.axem-subpanel li.is-active {
    color: #fff;
}

.axem-step-list li.is-active::before {
    background: var(--axem-accent);
    box-shadow: 0 0 16px rgba(109, 93, 252, 0.7);
}

.axem-step-list li.is-complete::before,
.axem-subpanel li.is-complete::before {
    background: var(--axem-success);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.5);
}

.axem-trace {
    margin-top: 16px;
    border-radius: 18px;
    padding: 14px;
    min-height: 132px;
    background: rgba(3, 7, 18, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: #b9c2ff;
    overflow: hidden;
}

.axem-trace-line {
    padding: 0 0 8px;
    opacity: 0;
    transform: translateY(6px);
    animation: axemFadeIn .3s ease forwards;
}

.axem-empty-state {
    min-height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px 18px;
}

.axem-empty-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: #fff;
    background: radial-gradient(circle at center, rgba(109, 93, 252, 0.28), rgba(109, 93, 252, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.axem-result-top h3 {
    margin: 8px 0 6px;
    font-size: 28px;
    color: #fff;
}

.axem-score-ring {
    --score: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--axem-accent) calc(var(--score) * 1%), rgba(255, 255, 255, 0.08) 0);
    box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.03), 0 18px 32px rgba(2, 8, 23, 0.28);
}

.axem-score-ring__inner {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(7, 12, 27, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.axem-score-ring__inner strong {
    display: block;
    font-size: 34px;
    line-height: 1;
    color: #fff;
}

.axem-score-ring__inner span {
    font-size: 13px;
    color: var(--axem-muted);
}

.axem-chip-row {
    flex-wrap: wrap;
    margin-top: 18px;
}

.axem-chip[data-tone="critical"] {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.axem-chip[data-tone="high"] {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
}

.axem-chip[data-tone="medium"] {
    background: rgba(59, 198, 255, 0.12);
    border-color: rgba(59, 198, 255, 0.25);
}

.axem-chip[data-tone="low"],
.axem-chip[data-tone="minimal"] {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

.axem-metrics {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.axem-metric {
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.axem-metric-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.axem-metric-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.axem-metric-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--axem-accent), #30d5c8);
    transition: width .7s ease;
}

.axem-grid-2 {
    margin-top: 18px;
    align-items: stretch;
}

.axem-grid-2 > * {
    flex: 1;
}

@keyframes axemFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .axem-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .axem-card {
        padding: 20px;
        border-radius: 22px;
    }

    .axem-hero,
    .axem-input-row,
    .axem-result-top,
    .axem-grid-2,
    .axem-progress-meta,
    .axem-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .axem-badge-group {
        justify-content: flex-start;
    }

    .axem-button {
        width: 100%;
    }

    .axem-score-ring {
        margin: 0 auto;
    }
}

.axem-helper--strong {
    color: #d6ddff;
    font-weight: 600;
}

.axem-prefix-preview {
    min-width: 250px;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.axem-prefix-preview__flag {
    font-size: 22px;
    line-height: 1;
}

.axem-prefix-preview__text {
    font-size: 13px;
    color: #c3cffc;
    line-height: 1.3;
}

.axem-prefix-preview[data-state="warning"] {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
}

.axem-prefix-preview[data-state="ok"] {
    border-color: rgba(34, 197, 94, 0.26);
    background: rgba(34, 197, 94, 0.08);
}

.axem-result-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.axem-result-flag {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 24px;
}

.axem-panel--history {
    margin-top: 22px;
}

.axem-history-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.axem-history-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.axem-history-item__main,
.axem-history-item__side {
    display: flex;
    align-items: center;
    gap: 12px;
}

.axem-history-item__side {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.axem-history-flag {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 24px;
}

.axem-history-phone {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.axem-history-meta,
.axem-history-score,
.axem-history-empty {
    color: var(--axem-muted);
    font-size: 13px;
}

.axem-history-score {
    font-weight: 700;
}

.axem-history-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed rgba(255, 255, 255, 0.09);
}

@media (max-width: 980px) {
    .axem-prefix-preview {
        min-width: 100%;
    }
}

@media (max-width: 720px) {
    .axem-prefix-preview,
    .axem-history-item,
    .axem-history-item__main,
    .axem-history-item__side,
    .axem-result-phone {
        width: 100%;
    }

    .axem-history-item,
    .axem-history-item__main,
    .axem-history-item__side {
        flex-direction: column;
        align-items: flex-start;
    }
}
