.page-tool .jwt-tools-card.converter-card-fill {
    height: min(48rem, calc(100dvh - 9.5rem));
}

@media (width >= 40rem) {
    .page-tool .jwt-tools-card.converter-card-fill {
        height: min(50rem, calc(100dvh - 9rem));
    }
}

.jwt-decoder-result,
.jwt-tools-result {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.625rem;
    min-height: 0;
    overflow: auto;
}

.jwt-decoder-meta,
.jwt-tools-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.jwt-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
}

.jwt-meta-chip.is-ok {
    border-color: color-mix(in srgb, #16a34a 35%, var(--border));
    background: color-mix(in srgb, #16a34a 10%, var(--surface));
    color: #15803d;
}

.jwt-meta-chip.is-warn {
    border-color: color-mix(in srgb, #ca8a04 35%, var(--border));
    background: color-mix(in srgb, #ca8a04 10%, var(--surface));
    color: #a16207;
}

.jwt-meta-chip.is-bad {
    border-color: color-mix(in srgb, #dc2626 35%, var(--border));
    background: color-mix(in srgb, #dc2626 10%, var(--surface));
    color: #b91c1c;
}

[data-theme='dark'] .jwt-meta-chip.is-ok {
    color: #4ade80;
}

[data-theme='dark'] .jwt-meta-chip.is-warn {
    color: #facc15;
}

[data-theme='dark'] .jwt-meta-chip.is-bad {
    color: #f87171;
}

.jwt-decoder-claims,
.jwt-tools-claims {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.5rem;
    flex-shrink: 0;
}

.jwt-claim-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface-muted);
}

.jwt-claim-key {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.jwt-claim-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
    word-break: break-word;
}

.jwt-claim-sub {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.jwt-decoder-panels,
.jwt-tools-panels {
    flex: 1 1 0;
    min-height: 18rem;
}

.jwt-decoder-signature,
.jwt-tools-signature {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 0;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
}

.jwt-signature-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.jwt-signature-value {
    display: block;
    max-height: 3.5rem;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    line-height: 1.45;
    color: var(--text-primary);
    word-break: break-all;
    white-space: pre-wrap;
}

.jwt-signature-note {
    margin: 0;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.jwt-secret-field {
    width: 100%;
    min-width: 7.5rem;
}

.jwt-expiry-hero {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.625rem;
    background: var(--surface);
    flex-shrink: 0;
}

.jwt-expiry-hero.is-ok {
    border-color: color-mix(in srgb, #16a34a 40%, var(--border));
    background: color-mix(in srgb, #16a34a 8%, var(--surface));
}

.jwt-expiry-hero.is-warn {
    border-color: color-mix(in srgb, #ca8a04 40%, var(--border));
    background: color-mix(in srgb, #ca8a04 8%, var(--surface));
}

.jwt-expiry-hero.is-bad {
    border-color: color-mix(in srgb, #dc2626 40%, var(--border));
    background: color-mix(in srgb, #dc2626 8%, var(--surface));
}

.jwt-expiry-status {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.jwt-expiry-countdown {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.jwt-expiry-bar {
    height: 0.375rem;
    border-radius: 999px;
    background: var(--surface-muted);
    overflow: hidden;
}

.jwt-expiry-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.3s ease;
}

.jwt-expiry-hero.is-ok .jwt-expiry-bar-fill {
    background: #16a34a;
}

.jwt-expiry-hero.is-warn .jwt-expiry-bar-fill {
    background: #ca8a04;
}

.jwt-expiry-hero.is-bad .jwt-expiry-bar-fill {
    background: #dc2626;
    width: 100% !important;
}

.jwt-claims-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.jwt-claims-table th,
.jwt-claims-table td {
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.jwt-claims-table th {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-muted);
}

.jwt-claims-table td:first-child {
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
    color: var(--primary);
}

.jwt-claims-table td:nth-child(2) {
    font-family: var(--font-mono);
    word-break: break-word;
}

.jwt-claims-table .jwt-claim-detail {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.jwt-claims-table-wrap {
    flex: 1 1 0;
    min-height: 12rem;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
}
