.tool-section {
    padding: 2rem 0 5rem;
    background: #fff;
}

/* ========== Tab 切换 ========== */
.jwt-tabs {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.jwt-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.jwt-tab + .jwt-tab {
    border-left: 1px solid #e2e8f0;
}
.jwt-tab:hover {
    background: #f8fafc;
    color: #334155;
}
.jwt-tab.active {
    background: #4f46e5;
    color: #fff;
}
.jwt-panel {
    display: none;
}
.jwt-panel.active {
    display: block;
}

/* ========== 查询/生成卡片 ========== */
.jwt-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
}
.jwt-search-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
}

/* 表单标签 */
.jwt-form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 0.4rem;
}
.jwt-form-hint {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

/* 算法选择按钮组 */
.jwt-alg-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.jwt-alg-option {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.jwt-alg-option:hover {
    background: #f1f5f9;
    border-color: #c7d2fe;
    color: #4f46e5;
}
.jwt-alg-option.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* 快速标签 */
.jwt-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.jwt-tag:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #4f46e5;
}

/* ========== 结果卡片 ========== */
.jwt-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
}
.jwt-result-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
}
.jwt-result-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
}

.jwt-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jwt-status-icon.status-valid { background: #dcfce7; color: #16a34a; }
.jwt-status-icon.status-warn { background: #fef3c7; color: #d97706; }
.jwt-status-icon.status-error { background: #fee2e2; color: #dc2626; }

.jwt-alg-badge {
    padding: 0.2rem 0.6rem;
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}

/* 过期警告 */
.jwt-expired-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #92400e;
}

/* ========== 区块标题 ========== */
.jwt-section-title {
    display: flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 0.85rem;
}

/* JSON 格式化展示 */
.jwt-json-view {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.82rem;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
}

/* Payload 表格 */
.jwt-payload-table {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.jwt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.jwt-table th {
    background: #f8fafc;
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.jwt-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.82rem;
    vertical-align: middle;
}
.jwt-table tr:last-child td { border-bottom: none; }
.jwt-table tbody tr:hover { background: #f8fafc; }
.jwt-table td.mono {
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.8rem;
    word-break: break-all;
}
.jwt-table .claim-name {
    font-weight: 600;
    color: #475569;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    white-space: nowrap;
}
.jwt-table .claim-type-tag {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    margin-left: 0.4rem;
}

/* 时间信息 */
.jwt-time-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.jwt-time-card {
    flex: 1;
    min-width: 180px;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.jwt-time-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}
.jwt-time-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}
.jwt-time-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

/* 签名框 */
.jwt-sig-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.78rem;
    color: #94a3b8;
    word-break: break-all;
    line-height: 1.6;
}

/* Token 结构预览 */
.jwt-parts-preview {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.jwt-parts-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.jwt-parts-item:last-child {
    border-bottom: none;
}
.jwt-parts-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 70px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}
.jwt-parts-value {
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.78rem;
    color: #334155;
    word-break: break-all;
    line-height: 1.5;
}

/* 复制按钮 */
.jwt-copy-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.15rem;
    border-radius: 4px;
    transition: all 0.15s;
    line-height: 1;
    margin-left: 0.35rem;
}
.jwt-copy-btn:hover { color: #4f46e5; background: #eef2ff; }

/* 空状态 */
.jwt-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #94a3b8;
}
.jwt-empty svg { margin-bottom: 0.5rem; }
.jwt-empty p { margin: 0; font-size: 0.85rem; }

/* ========== 校验相关样式 ========== */
.jwt-verify-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jwt-verify-icon.verify-ok { background: #dcfce7; color: #16a34a; }
.jwt-verify-icon.verify-fail { background: #fee2e2; color: #dc2626; }
.jwt-verify-icon.verify-warn { background: #fef3c7; color: #d97706; }

.jwt-verify-badge {
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}
.jwt-verify-badge.badge-ok { background: #dcfce7; color: #16a34a; }
.jwt-verify-badge.badge-fail { background: #fee2e2; color: #dc2626; }
.jwt-verify-badge.badge-warn { background: #fef3c7; color: #d97706; }

.jwt-verify-compare {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.jwt-verify-compare-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}
.jwt-verify-compare-item:last-child {
    border-bottom: none;
}
.jwt-verify-compare-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    flex-shrink: 0;
}
.jwt-verify-compare-value {
    font-size: 0.8rem;
    color: #334155;
    word-break: break-all;
    line-height: 1.5;
}
.jwt-verify-compare-value.mono {
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
}

.jwt-verify-preview-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'SF Mono','Fira Code','Consolas',monospace;
    font-size: 0.82rem;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .tool-section { padding: 1.5rem 0 3rem; }
    .jwt-tab { font-size: 0.78rem; padding: 0.6rem 0.6rem; gap: 0.25rem; }
    .jwt-tab svg { width: 16px; height: 16px; }
    .jwt-time-card { min-width: 140px; }
    .jwt-alg-select-group { gap: 0.25rem; }
    .jwt-alg-option { padding: 0.3rem 0.55rem; font-size: 0.72rem; }
}
